dop2000's Forum Posts

  • Please post a screenshot of your code. It takes more time to request files from web, so if you are not using AJAX correctly, this may explain why it doesn't work.

  • You do not have permission to view this post

  • Press F11 when you see this error, and check errors messages in the console log.

  • It's not necessary, but if you want to buy me a coffee, the link is in my profile.

    Happy New Year!

  • Yes, <> operator means "not equal". Here is the full list of operators:

    construct.net/en/make-games/manuals/construct-3/project-primitives/events/expressions

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add event -> System -> Evaluate expression

  • You can do 4 separate loops - one for each side of the square.

    Or you can try this:

    For "y" from 1 to 10
    For "x" from 1 to 20
    System evaluate expression: (loopindex("x")=1 | loopindex("x")=20 | loopindex("y")=1 | loopindex("y")=10)
    
    .... Create Sprite at (loopindex("x")*32, loopindex("y")*32)
    
  • Loops is the way to do this. For example:

    For "y" from 1 to 10
    For "x" from 1 to 20
    ..Create Sprite at (loopindex("x")*32, loopindex("y")*32)
    
  • Actually, if the sprites may be overlapping, then don't use "Evaluate expression", use "Pick by evaluate" instead:

  • There are two ways to do it -

    1. create an OR-block, but it needs to be a sub-event under "Mouse cursor is over object"

    2. use System Evaluate expression as on your first screenshot.

  • You need "OR" operator here, not "AND":

    Sprite.AnimationFrame=1 | Sprite.AnimationFrame=2 | Sprite.AnimationFrame=5

  • -> Array: Set value at (0, 0) to Cube.X

    -> Array: Set value at (1, 0) to Cube.Y

    -> Array: Set value at (0, 1) to Circle.X

    -> Array: Set value at (1, 1) to Circle.Y

    Check out Russian C3 communities:

    prodevs.ru/forum

    vk.com/prodevs

  • What does this mean - "X 1 & all Y" ?

    If you need to save all sprite properties in the array, see the demo I posted in your other topic.

    If you need to only save sprite position, then what exactly is the issue? You can do something like this

    + System: For each Sprite
    -> Array: Set value at (LoopIndex, 0) to Sprite.X
    -> Array: Set value at (LoopIndex, 1) to Sprite.Y
    
  • You have lots of mistakes in this code..

    1. If you have multiple enemies, event 20 will not work correctly, because it will only check StateTimer of the first enemy. But it will change the state for all enemies.

    2. You should not deactivate the "wonder" group, because while some enemies may be in "pursue" state, others may still be in "wonder" state.

    3. Enemy On Created is not needed in this case. But if you are going to use it, it has to be a top-level event, don't nest it under other events.

    You need to change your code like this:

  • No, don't use "Trigger once" with multiple instances! This will not work correctly.

    Move lines 24-25 into "Enemy on created" event, or inside the event where you set State="Pursue" for enemies.