Need help making an opening gate
by David Cox · in Torque Game Engine · 03/20/2010 (11:32 pm) · 4 replies
I was wondering if anyone knows of any tutorials on making a gate that will open once the player has obtained an item/defeats an enemy.
About the author
#2
03/21/2010 (2:02 pm)
Well, I'm still new to this so really need a tutorial that shows all the steps to do that as wanting a gate for a demo I'm making for class.
#3
www.torquepowered.com/community/resources/view/10200
03/30/2010 (7:44 am)
This might be a good place to start:www.torquepowered.com/community/resources/view/10200
#4
for an item obtained you could place code in the players onCollision callback. This is executed every time the player runs into something(anything). If it is an item, the player will attempt to pick it up. Mark the item somehow (dynamic datablock field, etc) and check for that field in this callback. If its there, open the gate.
03/30/2010 (9:28 am)
for a defeated enemy you could place code in it's onDisabled callback. If the enemies state is dead, open the gate(animation or however you intend to open the gate).for an item obtained you could place code in the players onCollision callback. This is executed every time the player runs into something(anything). If it is an item, the player will attempt to pick it up. Mark the item somehow (dynamic datablock field, etc) and check for that field in this callback. If its there, open the gate.
Torque Owner Ivan Mandzhukov
Liman3D
When you obtain your item, play your animation and delete the convex when animation is finished - this will allow the player to pass through.