codah's Forum Posts

  • Yessss.. and viruses..

    Or pose them a paradoxical question... smoke issues forth.. etc.

  • There's nothing really to fix, rounding error is inherent. You have to work around the limitations.

    Edit: I haven't worked with much numerical stuff in C2 so I'm not sure all the available facilities.

  • Won't it be easier if you just use action:sort array and then action:reverse array. This is quite straight forward if the initiative is at X-index=0.

    Won't work with 2d array (easily)..

    edit: but I will stand corrected.

  • how strange...

    all this time, I thought .1 + .1 + .1 was .3

    math is even harder than I thought!

    (You're right, I'm amused...)

    The joys of floating point numbers. A good wakeup call for all of us though

  • Check in the debugger. Your value is actually 0.9999999999999999 but being displayed as 1 in the top textbox.

    Change it to Text: Set text to str(variable1) for much amusement

    Edit: So looks like the 'auto int-to-string' conversion is rounding up..

  • You're right it might not be suitable in your case. Will have to think about it when I get a sec.

  • You can change the hotkey..

    In the top toolbar (small one) click the dropdown next to the debug button, select More Commands, then the Customize button down the bottom.

    Unfortunately not everything can be given a hotkey.

  • See if this helps. It's pretty rudimentary but still.. This is based on different objects rather than one object/multiple animations. It's based on the autorunner template.

  • Pretty sure you're not stupid Can you post the capx? We could help you more.

  • Also, search in document for those times you forget which event sheet you need.

    Sounds good.

  • You could have the invisible wolf not as a separate object type but as a normal wolf object, and have an instance boolean variable that tracks if it is an 'invisible' variant. When it gets shot by the observerTower, just toggle the flag (to make it shootable by normal towers) and bump its opacity to 100. If I've understood your needs.

    Another thing (more general) is to have more families than just 'enemies'. e.g. 'shootable' or whatever. You can have objects in more than one family to give you more control. It's 'kind' of like dealing with a class hierarchy that way.. kind of.

  • If you move the 4 lines that are unnecessarily executed in the while loop.. it's identical to mine I don't see the point in passing in the '3' to the function though.

    https://db.tt/SfAPOca2

  • Check the tutorials/samples.

  • I could try writing proper code for it via Javascript SDK but I'd like to do it within the Construct 2 if it is possible.

    that sounds pretty over the top You could just have, e.g., a boolean instance variable IsGui or similar, and check for that (negated) in all your pickings.. i.e. your sprites in the UI would have that as True. But it is a pain to have to check for that everywhere. Can't help feeling there's a 3rd party plugin that might do the job but I'm not sure ..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Lol