Destroy Platform

Discussion in 'How Can I...?' started by michaelfriel1988, Apr 6, 2016.

  1. michaelfriel1988

    michaelfriel1988 Boxer

    Joined:
    Sep 25, 2015
    Messages:
    76
    Likes Received:
    8
    Hello all,

    So I want my character to destroy a platform once he jumps onto it, whats the best way to do this?

    Attempted a few ways of doing this with no luck :(

    Help much appreciated.
     
  2. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    700
    If that is ok to let it 'fall' then add Y velocity to that and Wake Up to Collision Based. If you really need to destroy it as in explosion or something like that then do the same, except the fall speed should be super slow, like -0.1 or -0.01, and few pixels below that place an object which is a character bullet with no spawn and no movement and Destroy All... With the speed you can control how long does it take to destroy the platform after your character touched it.
     
    Cesart1990 likes this.
  3. michaelfriel1988

    michaelfriel1988 Boxer

    Joined:
    Sep 25, 2015
    Messages:
    76
    Likes Received:
    8
    Thanks for the reply. The issue with your suggestion is that the platform is already moving when you jump onto it so the wake up method wont work.

    Basically I've got a platform attached to a physics block that drags it across the screen, I want the character to jump onto the platform to destroy it therefore dropping the physics object.
     
  4. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    700
    Hmm, that might be a bit tricky because if you link that physics block to the platform and you kill that platform then the physics object will be destroyed too. It is like an object hierarchy, so if you kill the parent then all children are killed too.

    I think the only way to get around this behavior is to place that platform underneath the physics one, so that is resting on it. When you destroy that platform, there will be nothing to support the physics object therefore it will fall down...

    You can attach a Logic Transform underneath to your character which then places the platform far off the screen with the Replace logic...
     
  5. playsgames6666

    playsgames6666 Miniboss Boxer

    Joined:
    Nov 13, 2015
    Messages:
    1,168
    Likes Received:
    745
    Sorry mate i just saw your PM you sent me. Been a bit busy at work.
    Ill answer it here for you anyway.
    Ok so what i did was added an object and set it as a decoration. Changed its opacity to zero. Set it to spawn at whatever you want.
    Then added a block image as an action.
    Then Attached/linked the The action block to the decoration object.
    Set action animation to replace powerup.
    In the action animation added the block as an object, set to physics object.
    Im not to good at explaining things, hope it makes a bit of sense.
    i can probably make a little demo file in a 2 or 3 days if you want, and you can play around with it.
    I got my game on the App Store too if you want to try it out.
    Theres not much to it.
    https://itunes.apple.com/au/app/jump-stack/id1095133214?mt=8
    Also had some trouble with the game lagging and crashing.
    Not real sure but might be something with the amount of objects spawning.
    Only on IOS it seems to happen, Not real real sure on what devices yet, but will find out. Android seems to be working pretty well.
    Anyway was just a bit of fun to make.
     
    Last edited: Apr 7, 2016
    michaelfriel1988 likes this.
  6. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,025
    Give the platform damage and health and make the platform an enemy ... with less damage and health than your character, the Character will destroy it every time it touches it...
     
    michaelfriel1988 likes this.
  7. TheViseOne

    TheViseOne Boxer

    Joined:
    Sep 25, 2015
    Messages:
    47
    Likes Received:
    18
    My question would be how the platform should be destroyed?

    Does character can jump of the platform before it is destroyed?
    Does character dies/falls down if he touches platform?

    How does the platform move? Do you use any logic to move it from one place to another?

    We could give better advice if we knew what you want to achieve.
     
  8. michaelfriel1988

    michaelfriel1988 Boxer

    Joined:
    Sep 25, 2015
    Messages:
    76
    Likes Received:
    8
    Thanks playsgames you're method works perfectly.

    @heathclose Thanks for you suggestion also, will probably try both nice to learn as much as possible.
     
    playsgames6666 likes this.

Share This Page