mrkujo's Forum Posts

  • 3 posts
  • Not really sure what is wrong with the link, it works when I use it :/

    copy.com/s/Qt1HWgB0kY0B/wrong.png

    I didn't use any example, I'm trying to do very basic thing but I fail to understand how events work.

    To be more clear, I'm trying to do:

    on button release

    if(something) then do something

    if(something) then do something

    do other stuff

    But everything stops after first if, when it is not true, I want it to continue and do second if and stuff after that too no matter if the first if's were true.

    And I don't see any rts template in my templates. Am I missing something?

  • Thank you for that example, it explained what I wanted.

    I managed to work it out without all the if..else conditions however, and encountered another copy.com/Qt1HWgB0kY0B.

    I still don't understand events well, I'm really new to this.

    I want the last block part to be done even if first two won't happen at all. So the first two parts just switch coords if needed to, and the third part should be done even if nothing was changed in previous blocks, but it doesn't happen. It won't run if first two blocks didn't run. How to do it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have this situation, where I want to be able to select multiple units like in rts.

    To do this I need an if...else if... loops with if...else if... loop inside (to cover every type of mouse dragging and unit positions). It would be so simple in plain js, but I have no idea how to do this with events. Is it even possible?

    Something like this:

    if(start_x > end_x)
         if(start_x < unit_x+unit_width/2 && ...)
              ...
    else if (...)
         if(...)
    

    How can I do this using events?

    Maybe there is already that functionality (selecting multiple objects) that I don't know about? Or maybe a way to do this without all those if's?

  • 3 posts