_zodchiy_'s Forum Posts

  • 9 posts
  • eltonnobrega

    Sprite.Count >= 2 will always be true after a while in your code.

    Something you wanted something like this:

    Thanks, it works!

    But I was also confused because in my head the correct one would be spriteCount >= 3.

    Maybe because the object is created first and then the condition is checked?

  • I create objects with an interval of 2 seconds. I want every let's say 11 seconds the interval between object creation to be 0.5 second. And when there are 3 objects with this frequency, I will set 2 seconds again.

    What I'm doing is this:

    But on the first 3rd second, 2 extra objects are created. Why? How to get rid of this? And am I controlling the frequency of object creation correctly? Or maybe there is some more rational way?

    Thanks!

  • Hi guys!

    Why in the game, installed on a smartphone from apk file, at Every tick event objects move with jerks? I have tried Set X, Move forward, Simulate 8Direction. And when I start touching the screen (the Is in touch event is triggered) the objects jerk even more often.

    I tried different smartphones on different processors. I've reduced the size of the sprites. Nothing changes. Moreover, if I open Construct editor on my smartphone and run preview layout in it, I don't see such jerks there. If I compile the apk file and run it, the objects jerk.

    Link to the Construct file:

    dropbox.com/scl/fi/w8dl9501cggrrb9i9suaz/TestGameplay.c3p

    Link to APK file:

    dropbox.com/scl/fi/x6y2aloh4yoc8k4ah2655/TestGameplay.android.debug.apk

  • Adding an "else" will kinda combine the 2 actions together, so your logic would look at the first event "IsSelected", and if you use an "else" on the next event, then those two events work like "is selected? Do this. Otherwise, do this other stuff for when it's not selected".

    I got it, cool! That works too. Thank you!

    And maybe someone knows why the second tap on the sprite does not work immediately, but after 1 second? I don't mean the reaction to the tap, I mean that the second time you tap on the sprite, you have to tap several times to active it.

  • WackyToaster

    Add an "else" to the second condition to fix it.

    Sorry, didn't quite understand "else" with what condition?

    You should do something like this instead:

    Toggle! Of course! It works, thank you! :) Hopefully this logic will help me identify the first and second selected objects to swap them as inventory items.

  • Why doesn't such a structure work?

    I want to select objects and deselect them. To then apply effects only to the selected objects.

  • That's great! Thanks a lot! Using MoveTo works fine. Only I gave up the loop and use the function in time slots by Every X seconds. Because Repeat calls the function every tick, if I understand correctly, and the loops overlap each other. I tried using On Arrived, but it doesn't work. The sprites move strangely. I think it's because I have Wait X seconds timers in the body of the function.

  • It will be much easier to use MoveTo behavior here - you can give it waypoints for the entire path.

    Do you mean adding waypoints coordinates to the Array and loading them in the loop? Because Move To behaviors doesn't work in a loop for me either.

    If you need to use Tween, I would suggest giving tags to tweens. Move them all into a function. Instead of using "Repeat 10 times" loop, run the function once. When the last tween ends (use "On Tween Finished" trigger), run the function again.

    I tried it, but the object behaves strangely, moving randomly :(

    Maybe you know of some tutors or manual on topic of waypoints and tween tags?

    I would appreciate it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys,

    I need to loop the enemy's movement to the pattern.

    When I use loops (for, while, repeat), the tween's animations are only played once anyway.

    What am I doing wrong? :)

  • 9 posts