igorholi's Forum Posts

  • 4 posts
  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • That is probably a good idea, I'll try that as soon as possible to check if it works for my application.

    Thanks again :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First of all, thank you for helping me :)

    Checking in debug mode I now see that the timer did not stop, you were right. I thought it has stopped because my coolbox stops reducing its height.

    I understand your solution and the downsides of it.

    I'm trying to create that "cooldown" effect over a skill in a RPG, I have multiple skill icons and I want to create that effect in every instance of that skill icon when I activate the skill.

    Do you know a better way to do that? Considering that every skill has its own cooldown time as an instance variable.

    P.S. I'm new in Construct.

    P.S. Sorry about my English if something I wrote is not clear, it's not my first language.

  • Hey, this is the current situation:

    (I know I am not stopping the timers right now, I'll deal with that later...)

    With this setup, when I press 1, objects are spawned over my skill icons in position 1. And the cooldown box starts working perfectly.

    When I press 2, the new objects are spawned over the skill icons in position 2 and their timer starts. But the previous boxes (over number 1 icons) stops...

  • Hi there,

    I have an object that spawns multiple times. For each instance, I need to start a regular timer.

    But every object spawned has a different instance variable containing the time in seconds to start that timer.

    So, I was trying to change the timer tag based on another instance variable, an ID. This way, the tag changes each time, and so does the On Timer tag.

    For example

    Loop spawning objects

    OBJECT Start Timer _ "Name"&Object.InstanceVariableName for Object.InstanceVariableTime seconds (Regular)

    OBJECT On timer "Name"&ObjectInstanceVariableName Actions

    It works for the first set of spawned objects, but every time I change the instance variables to start a new set of objects with different a timer setup, the previous set of timers stops.

    However, if I change the program and create different Timer Tags hardcoded, like:

    Inside the loop

    if "Name"&ObjectInstanceVariableName = Name1 then Start Timer "Name1"

    if "Name"&ObjectInstanceVariableName = Name2 then Start Timer "Name2"

    ...

    On Timer "Name 1" Actions

    The setup works perfectly, and the previous timers don't stop.

    My question is:

    Is there a way to start multiple timers with tags that are variable strings and not "hardcoded" names? How do I do that?

    (I have also tried to use a string global variable that was set before the Start Timer and was set to be the timer's tag and on timer trigger, but that didn't work as well, I thought it could be a "string problem" or something)

    Thanks.

    Tagged:

  • 4 posts