Game Development Community

Triggers, Collisions, & changing Grahpics

by Scott Peal · in Torque Game Engine · 06/20/2004 (4:48 pm) · 3 replies

Say you have a pinball machine(DTS) and you need the character to press a button on the pinball machine. When the button is pressed, the pinball machine's graphic on the scoreboard will change to another graphic.

Question: How do you recommend I do this? and how would I change the graphics on the fly? Is even possible for the character to "hit" a button?

Thanks so much for a point in the right direction.

#1
06/20/2004 (6:02 pm)
Easy... set up an animation that will do the transition (maybe using an IFL?), then trigger that animation when the use key is hit.

There are a few resources that demonstrate use keys, but the basic idea is to cast a ray or check against a bounding box to see what the user was facing when they hit the key, then call script or C++ to trigger some action.
#2
06/21/2004 (11:39 am)
@Ben: Thanks for the info.

how would you have the graphics change.With a the animation or treat it like another object?
#3
06/21/2004 (9:24 pm)
An animation, I think...