Spawn Actor with the same speed as the other actor

OperationVideoGameOperationVideoGame Member Posts: 5
edited November -1 in Working with GS (Mac)
I am making a game that deals with actor going through portals. When the Actor collides with the entry portal it destroys itself and spawns an actor at the exit portal. The problem is that when he spawns on the exit portal he starts back at 0 speed and no gravity. I want him to spawn the actor while maintaining the other actors speed, and direction. Any way to do this???

Thanks for the help.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    i wouldnt spawn and destroy it, this is how i would do it.

    Make 4 real attrributes: portalx, portaly, playermotx, and playermoty

    in the 2nd portal have to change attribute behaviors

    change portalx to self position x and change portaly to self position y

    then in the player have a rule when it collides with the first portal

    change self postion x to portal x
    change self position y to portaly
    change playermotx to self motion linear x
    change playermoty to self moition linear y

    then put a timer in that rule after .1 seconds run to complterion checked

    change self motion linear x to playermotx
    and change self motiion linear y to player mot y
  • OperationVideoGameOperationVideoGame Member Posts: 5
    It worked!!!!!! Your a genius!!!!! Thank you sir
Sign In or Register to comment.