Sending back in space while orbiting.

Hi!

So I've got this actor, who when collides with gravity circle it starts orbiting. I want to send it back in space when touched, of course at 90' degress of its current position.

I am quite stuck with that one.

Any ideas? :(

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    When touched, destroy the actor and replace it with a new identical actor with a new set of rules that instruct it to move away from the centre of the orbit.
  • youngdeveloperyoungdeveloper Member Posts: 8
    @Socks

    I was actually using your orbit-drop7, with few changes, as for the first 'layer' of gravity I had used the angry birds: space stuff. It looks pretty good, but makes three identical actors in all.

    The first one to shoot away from the orbit
    The second one to orbit like a space bird
    The third one to orbit constantly when planet is near

    Thank you for your hint, I've made a pic to illustrate well what I have in mind. Is my logic working properly?

    image
    Uploaded with ImageShack.us

    Direct link:
    http://img4.imageshack.us/img4/5336/logice.png

  • cucurbitcucurbit Member Posts: 68
    edited April 2013
    It would be great to know the answer here as I work on something similiar. I belive there must be a boolean switch here somewhere and three identical actors.
  • youngdeveloperyoungdeveloper Member Posts: 8
    Ok, here is the gamesalad file with shown mechanics I want to achieveand what I got so far.
    http://www.mediafire.com/?82ox3ty3gux7gpg

    First of all - the last actor (the blue one) should go away in the position from the planet's center but I don't know how. If you click the right corner box the attribute will change to 0/1, it is made really unprofessional I believe, but as for now I don't know how to make it different.

    I would greatly appreciate any help - if you are taking it professionally I belive we can work something out.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    To make actor called "birducieka" travel outward from the center of the planet -- you need to add a change velocity behavior at the top of its list.

    Change Velocity
    -- Direction: vectorToAngle(self.Position.X-game.planetPositionX , self.Position.Y-game.planetPositionY )
    -- Relative To: scene
    -- Speed: 100
  • youngdeveloperyoungdeveloper Member Posts: 8
    Great! It works pretty well. What do you think of main idea/mechanics though?
  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2013
    To make actor called "birducieka" travel outward from the center of the planet -- you need to add a change velocity behavior at the top of its list.

    Change Velocity
    -- Direction: vectorToAngle(self.Position.X-game.planetPositionX , self.Position.Y-game.planetPositionY )
    -- Relative To: scene
    -- Speed: 100
    @RThurman
    @youngdeveloper

    You could also use a Move To behaviour (aimed at the Planet) with a negative speed.

    Like this:

    http://www.mediafire.com/?bmbq5pg50d4u3v2

    (click on the red square to switch on the negative gravity).
Sign In or Register to comment.