Game Development Community

In defaults.blinds.cs i foudn somethign interesting

by Tom · in Torque Game Engine · 07/23/2006 (2:47 pm) · 2 replies

//------------------------------------------------------------------------------
// Mouse Trigger
//------------------------------------------------------------------------------

function mouseFire(%val)
{
   $mvTriggerCount0++;
}

function altTrigger(%val)
{
   $mvTriggerCount1++;
}

moveMap.bind( mouse, button0, mouseFire );
//moveMap.bind( mouse, button1, altTrigger );

ok, i know what mouse fire does!
but it is interesting that the altTrigger is also already coded into starter.fps.

i searched for alternate fire of weapons, and everywhere, ppl added more triggers.

but could we just uncommend these lines, and then we already had one trigger thats done!.

so my question:

is alt fire build into torque? if yes, how would a weapon file looks with an alt fire stage?

#1
07/23/2006 (3:05 pm)
You can fire from whatever slot that you want. Notice $mvTriggerCount0++?

That's slot 0. Ie your main weapon.

So stock Torque has support for two slots out of the box, and it's very trivial to add more.
#2
07/28/2006 (7:12 am)
Quote:
//------------------------------------------------------------------------------// Mouse Trigger//------------------------------------------------------------------------------function mouseFire(%val){ $mvTriggerCount0++;}function altTrigger(%val){ $mvTriggerCount1++;}moveMap.bind( mouse, button0, mouseFire );//moveMap.bind( mouse, button1, altTrigger );

you will notice two very important things here
first alttrigger does not define holding down alt key
its a function for mouse button 1

the other thing to notice is
the second function is // rem'd out

from my experiance so far //rem'd out
usually means more than just removing the // rem
from the source is required to implement

and dont forget you need a player model and weapons than can both be equipped
in order to use more than stock 2h weapon included

however it does seem to indicate that creative use could be
a nice C4 explosive (non eq'd weapon) with a player controlled
detonation is very possible with a few minor changes

most of my work is with RTS and TLK so I cant speak with alot
of FPS exp here