Actions that are multiple use

Discussion in 'How Can I...?' started by Jeff Wong, Sep 28, 2015.

  1. Jeff Wong

    Jeff Wong Boxer

    Joined:
    Sep 25, 2015
    Messages:
    11
    Likes Received:
    2
    Hi all!
    Great to see this new forum and community!

    I was wondering if anyone happens to know how to make an action remain on the screen permanently even after the character touches it.
    Or an action "powerup" that has more than one charge, so that the character can collect it more than once. Or even if there is a way to make the action spawn based on some kind of trigger, this will achieve the same result.

    I tried connecting actions to a spawner, but this doesn't seem to work.

    Any thoughts on how to achieve this would be greatly appreciated!
    Thanks in advance!

    Jeff
     
  2. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    What about if you had a transparent object attached to a power-up that gets activated on collision and drags the power-up into your desired position? As you move around the screen you could have multiple power-up's off-screen that are dragged into the gameplay area at various positions or even the same place. This way, when you've collected the first power-up, you don't have to worry about trying to attach something to the original power-up to make it re-appear, you just have duplicates of the power-up off-screen.

    You could also have some of them appear over time by being slowly dragged into position, so if you're on a certain screen for say, approx 50 seconds, you could set the velocity of a collision object to drag a power-up onto the screen with a certain velocity so it shows up after around 30secs or so. Other's could appear almost instantly with a super-high velocity dragging the power-up into place in an instant. Just halt the moving object by placing a logic piece in the path of the transparent moving object. If you set an object to move downwards with a -20:00 velocity, simply set the Logic piece to +20:00 and when the transparent object collides with it, it'll stop and your attached power-up will be nicely in place. :)

    I just tried this setup and it works pretty well.
     
  3. Jeff Wong

    Jeff Wong Boxer

    Joined:
    Sep 25, 2015
    Messages:
    11
    Likes Received:
    2
    Hi Phill!
    Thanks for the suggestion!
    Am giving it a go now! I think it could work for what I'm trying to do, provided I don't let the player stay on the same screen indefinitely.

    Much appreciated :)
     
  4. Sean Buildbox

    Sean Buildbox Serious Boxer

    Joined:
    Sep 24, 2015
    Messages:
    902
    Likes Received:
    1,076
    I like the thinking outside the box @Phill Mason I think actions will gain more native functionality as time goes on but in the meantime its as my signature says "Restriction Breed Creativity" ;)
     
    stevinz and Phill Mason like this.

Share This Page