Game Development Community

Move and object

by Brandon Fogerty · in Technical Issues · 06/08/2007 (4:02 pm) · 4 replies

Hi. How would I move an object on an onCollision event?

onCollision(%this, %obj, %col)

How can I move the %obj object's location? Thanks!

#1
06/08/2007 (4:30 pm)
Is it a static object or an ai player? Assuming it's a static object you should be able to use the .SetTransform command to give it new coordinates in the game world.
#2
06/08/2007 (4:36 pm)
How about an AiPlayer?
#3
06/08/2007 (4:42 pm)
And also, what I want to do is when the player collides with a static object, I want the velocity of the player to be transfered to the static object and for the static object to be moved appropriately. How would I go about this? Thanks in advance!
#4
06/08/2007 (4:55 pm)
And also, what I want to do is when the player collides with a static object, I want the velocity of the player to be transfered to the static object and for the static object to be moved appropriately. How would I go about this? Thanks in advance!