dop2000's Forum Posts

  • sizcoz, if you need to move along the curved path, there is a great addon by Rexrainbow:

    construct.net/forum/extending-construct-2/work-in-progress-addons-30/behavior-rex-spline-114539

    Unfortunately, it doesn't have an option to instantly draw/visualise the path.

  • Also, the invisibleSprite instance created in event 16 will not be available yet in event 15. You need to wait one tick for it to be added to layout (insert "wait 0" before changing bullet properties). Or explicitly pick the sprite instance by UID.

  • scirra.com/tutorials/all

    Search for "AI" or "patrol"

  • Man, there are so many mistakes in your comment... :)

    as for (random(-10)+-10) the +- is a bit redundant u could've easy do (random(-10)+10) its the same thing as the +- negates itself and u remain with a 10 positive.

    +- doesn't negate itself, it's the same as subtraction. (n+-10)=(n-10)

    So (random(-10)+-10) will return values from -20 to -10.

    random(0) picks any number from -infinity to +infinity

    No, random(0) is always 0.

    random(-10) same thing but focuses on -infinity spectrum up to -10

    No, when there is only one parameter, random returns values from 0 to that parameter, but not including it.

    So random(-10) will return values from -9.999999999.... to 0

    random(1) same as above but towards +infinity from 1

    Again, this will return values from 0 to 0.9999999999...

    (in ur picture u have random(0)+0) that means 0+random(any number + or - value)

    (random(0)+0) is obviously just 0

  • If you want to save file with NWjs, better not use "Invoke download". Use NWjs-> Show Save dialog. On Save dialog OK -> NWjs Write File, put NWjs.ChosenPath in path field.

    To read a file: NWjs Show open dialog, On open dialog OK - AJAX request URL, put NWjs.ChosenPath in URL field.

  • random(0) is 0, so I'm guessing your event spawns 5 gems all in the same position.

  • See my edited comment above.

  • So the character moves correctly and mirrors, but animations are not playing? Could you re-upload the changed file? In the previous version it couldn't even move properly with the touchpad.

    EDIT: Actually, no need. The problem is that your two groups (Player Movement and TouchPad) are clashing. When no keys are pressed, your events 21-28 reset animation to "Idle" on every tick.

    Since you have more than one way to control the character, the best solution would be creating a separate group that will manage animations, not based on control method, but based on 8direction moving angle.

    Something like this:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Like this:

    Because angles in Construct can take negative and positive numbers, it's tricky to compare them. It's much easier to use specific conditions and expressions - "between angles" instead of "between values", "is clockwise from" instead of "is greater", anglelerp() instead of lerp() and so on.

  • It's hard to make sense of your code without seeing the project file and the structure of txt file with questions.

    If you need a randomized array, you can initially set array width to 0. Then read a new question from AJAX and insert it at index int(random(array.width+1))

    Or you can load all questions into the array at Y=1, put random values into Y=0 and then use "array sort".

    Or load all questions into temp array, then pick a random element, push it into another array and remove from the temp array. Repeat until all questions are transferred.

  • In real world or in a game?

  • You need to change the loop to "For each X element". This will not fix the problem (if there is any), but it's more efficient.

    You're monitoring only one fixed array element with browser log - CraftingTable.At(1,2). Try changing this to CraftingTable.At(CraftingTable.CurX,2)

    Also, have you tried Debug Mode? You'll be able to see the entire array.

  • R0J0hound Thanks! That was actually my second question - how do you chain two curves, or make a curve from 4 or more points?

    I tried drawing a second curve from where the first stopped, but it obviously didn't work that well.

  • Use System condition "Is between angles" instead of "Compare instance variable" in your TouchPad group in events 121-142.

    Also, in event 121 you have a mistake, the range should be -22.5 to 22.5

  • It does work:

    dropbox.com/s/ml7mf2upjz5vy5d/PinPlusDemo.capx

    You can do the same with events, of course. It's just easier with the behavior if you want to "pin" many different properties.