How do I use instant variable in wait or every x second?

0 favourites
  • 10 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • For example I have 2 same object(mob_range) with instant variable.

    How can I triggered them separately from each other?

    Right now, both of them look on one object(which was first created).

  • What exactly is happening and what do you expect to happen? From what we can see this looks ok but we can't see the full event in the screenshot.

  • I want to object A and object A2 look on their own variable and repeat spawn mobs separately.

    Object A instant variable = 1sec

    Object A2 instant variable = 2 sec

    Object A spawn every 1 second.

    Object A1 spawn every 2 seconds.

  • Bit difficult with the system condition. You could try using a timer behaviour. For each object on start of layout, start timer for time value 'object.variable'. Then on timer completed, spawn the object and start timer again for time value 'object.variable'. This should work well for picking the right instances.

  • Yep, I also tried it, but have some troubles with catching values.

    Thank you, I’ll try to use timer one more time

  • Yes if you are having trouble with timers then post again and with a screenshot of the events preferred.

  • Yes if you are having trouble with timers then post again and with a screenshot of the events preferred.

    Yep timer doesn't work, create a post within a problem - construct.net/en/forum/construct-2/how-do-i-18/timer-behavior-168037

  • Well you didn't need to create a new post but if you make the 2 events like I mentioned above it should work. On start of layout is so that the timer starts only once, and then the on timer should be a new event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well you didn't need to create a new post but if you make the 2 events like I mentioned above it should work. On start of layout is so that the timer starts only once, and then the on timer should be a new event.

    oh I thought I need to create one more post when you said create a new post :D

    Finaly nailed it! Timer Behavior helped.

    But here is one thing in case someone met same problem, you need to start timer one more time when you try to update it with changed instance.

  • > Well you didn't need to create a new post but if you make the 2 events like I mentioned above it should work. On start of layout is so that the timer starts only once, and then the on timer should be a new event.

    oh I thought I need to create one more post when you said create a new post :D

    Finaly nailed it! Timer Behavior helped.

    But here is one thing in case someone met same problem, you need to start timer one more time when you try to update it with changed instance.

    I know this is like 6 months old but could you share your solution? I'm trying to do something similar. Thanks in advance.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)