Game Development Community

How can I create triggers for building?

by kcpdad · in Torque Game Engine · 10/08/2005 (5:56 pm) · 0 replies

I want to be able to add a building to a mission so that when the mission loads a trigger is created around the building, e.g. to trigger power for players in a base. I noticed that the turret resource does something similar by calling an onAdd function for the AITurretData datablock. Can this be done in script or do I need to change the engine?
I can't call GameBase::scriptOnAdd() because both GameBase and InteriorInstance inherit from SceneObject. Should I be moving that method up to SceneObject and add a call to scriptOnAdd() in InteriorInstance or is there a better way?
Thanks!

About the author

Hobbyist working on a tank game when time allows. Play the prototype at => http://www.sytrept.com/60tons/