Matching Movements

dimsdaledimsdale Member Posts: 499
edited April 2012 in Working with GS (Mac)
Hi all,

Hoping some one can lend a hand. I have Peds walking along a path in front of a building. There is a pulleying system attach to a create on the side of a building. By clicking on the Pulley, you can rase the create up in the air. Once it reaches a certain hight and you drop it, I want it to be able to hit the Peds below.

So I'm moving the create up in the Y axis and when it reaches some invisible collision data I'm destroying it and replacing it with another object. The second object is in a different Tag group that I'm using to check collisions with Peds. It all work well, but the problem is I can't get the second new object to match the same movement speed as the old one. When it swaps, it stop and then starts building up speed again.

Is there a better way to do this? Can I match velocity some how?

Best Answer

  • tatiangtatiang Posts: 11,949
    edited April 2012 Accepted Answer
    What are you using to move your ... do you mean "crate"? Try change attribute self.motion.Linear Velocity.X to [new speed value]. If you want to match another actor's velocity, you need to broadcast that actor's speed by doing change (or constrain) attribute game.OtherActorsVelocityX to self.motion.Linear Velocity.X and then in the first actor do the reverse (change/constrain self.motion.Linear Velocity.X to game.OtherActorsVelocityX). Do the same for Velocity.Y.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • dimsdaledimsdale Member Posts: 499
    Yes thanks. I think Linear is the key here, I've been using Acceleration to move.
Sign In or Register to comment.