Create balloon type object/rule which raises actor vertically

Hi, I want an actor to collect a collectible which then raises the actor vertically for lets say 5 seconds - any advise how this can be achieved? I know its going to be a collide rule but don't know where to take it from there.

I also want the collectible to move with the actor (its a balloon) and then disappear after the 5 seconds.

Thanks

Comments

  • -Timo--Timo- Member Posts: 2,313
    hmm...
    if collides or overlaps with 'balloon'
    do
    change self.motion.linear velocity.Y to 100 (something you want)
    after 5 seconds change attribute
    self.motion.linear velocity.Y to 0 (or put it back to what it was/something you want)

    make 2 integer attributes and call them PlayerX and PlayerY
    go in the player
    constrain attribute 'PlayerY' to self.position.Y
    constrain attribute 'PlayerX' to self.position.X

    now the balloon :)
    make a boolean attribute, lets say we call it balloon
    in the balloon say if collides or overlaps with (the player?)
    do
    change attribute 'balloon' to true

    go in the balloon
    if attribute 'balloon' is true
    do
    constrain self.position.Y to attribute 'playerY'+10 (<- play with this untill its above the player^^)
    constrain self.position.X to attribute 'playerX'

    hope this helped :)
    good luck

    -Timo-
Sign In or Register to comment.