Dru's Forum Posts

  • 14 posts
  • Sure there's a workaround but then you lose the benefits of the "Wait for previous action".

    On larger projects its a bit convoluted that way.

  • In the screenshot below the txtColor text object gets overwritten by the Fruit events sitting underneath.

    https://drive.google.com/file/d/1FZL6qycbhlWBnPdjcxS79SyVCYRxqRHP/view?usp=sharing

    Shouldn't they be independent? Unless I'm misunderstanding how "Wait for previous actions to complete" works?

  • Ashley

    The new features added to the Pin behaviour are great but I was thinking as well as the "Destroy with pinned object" checkbox you could have a similar thing for object visibility. If the object its pinned to is made invisible then do the same to the pinned object.

    I use Pins a lot with UI and it would simplify the code for toggling the visibility of parts of the UI.

  • Any reason why I can't disable scripts in the event sheet? Like how I can disable regular events.

  • Thanks for the help that works well, I didn't think to use position absolute to drop another canvas on top.

  • Does anyone know if it's possible to use Chart.JS with the new scripting tools?

    The bit i'm having trouble with is creating a Canvas element to draw the chart to, I just don't know where to create this html element or how it interacts with the C3 app itself.

    <canvas id="myChart" width="400" height="400"></canvas>

    I know there's a Drawing Canvas plugin but how to access that through code?

    Any ideas?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can do this with JavaScript, use the Browser object and the Execute JavaScript action

    "select.options[2].style.color = 'red';"

    or background color

    select.options[2].style.backgroundColor = 'red';

    You'll need to give your list object the ID of 'select' which is in the properties panel. And then just swap the [2] for whichever list item you want to change.

  • Ah ok thanks so there are a couple of options to get around this. Either using physics or manually pushing the object out of the solid as it moves.

    It seems strange that while pathfinding finds paths around solids the object you then set to move along the path completely ignores solids.

  • Does anyone know why in this simple pathfinding demo the black square crosses over the ends of the red object when trying to move around it?

    Does pathfinding not use the objects collision polygon?

    https://www.dropbox.com/s/h3uamm9f9x34ydt/Pathfinding%20test.capx?dl=0

  • Do you mean something like this?

    http://ncase.me/sight-and-light/

    Wouldn't this also fix the problems when a light source is too near a shadow caster? Plus when light appears to pass between the seam of two adjacent sprites?

  • Ah forget about this it's working fine now.

    Not sure why I was getting inconsistent results.

  • Link to .capx file (required!):

    dl.dropboxusercontent.com/u/671857/TintTest.capx

    Steps to reproduce:

    1. Run the capex. The green square should appear brown with the Tint effect applied correctly.

    2. Works fine on Firefox v21

    3. Doesn't work on Chrome v27 or IE 10

    I'm pretty sure this was working one or two versions ago

    Observed result:

    Green square

    Expected result:

    Brown square

    Browsers affected:

    Chrome: yes

    Firefox: no

    Internet Explorer: yes

    Operating system & service pack:

    Win 7

    Construct 2 version:

    137

  • Ah thanks ramones that looks to work fine.

  • I?ve got a question about copying objects as if they were variables.

    I?m making a turn based card game with 4 players (hotseat game). Each player is represented as an Object with a number of attributes (CardsInHand, Score etc.).

    When Events happen in the game I need to update one of the players attributes depending on whose turn it is. So something like this

    Player1

    Player2

    Player3

    Player4

    <turn 1>

    CurrentPlayer = Player1

    <then play the turn>

    Add 1 to CurrentPlayer score

    Add a card to the CurrentPlayer hand

    Etc.

    <turn 2>

    CurrentPlayer = Player2

    What?s the best way to accomplish this while keeping the code as simple as possible?

  • 14 posts