Game Development Community

Aim first, then fire?

by deepscratch · in Torque Game Engine Advanced · 12/07/2008 (6:37 am) · 1 replies

Hi all
how would one go about setting up "aim first, then fire"?

ie:
nobody goes around running and jumping with a rifle shouldered and aiming,
especialy when there is no threat,
so.. can one set a script so that the default movement is relaxed, rifle easy,
then on fire button once, the weapon comes up to aim, second time fire pressed, it fires,
and waits 5 seconds befor returning to the idle stance if no more shots are fired?

any ideas?
thanks

#1
12/07/2008 (6:57 am)
Aiming down the sight would be an animation.

You'll probably want a script which works like the following:

1. Get target in LOS
2. Turn to target (setaimobject)
3. Play your aiming animation
4. Shooty-shooty

If you're not familiar with playing animations through script, search the forums for something like "play animation" or "thread animation".