Page 1 of 1

Moving triggers?

Posted: July 27th, 2010, 8:03 am
by csikon210
Is it possible to make moving (hurt)triggers?Second how can i make a trigger what if i triggered a hurt trigger activate or deactivate?

Re: Moving triggers?

Posted: July 27th, 2010, 8:26 am
by BatterY
Moving triggers is easy, just add targetname to the trigger.

Hurt trigger:
Key: targetname
Value: trigger_hurt

Trigger mover:
Key: targetname
Value: trigger_multiple

.GSC file

Code: Select all

main()
{
thread movetrig();
}

movetrig()
{
trigger1 = getEnt("trigger_multiple","targetname") //the reason i added this is because of avoid moving all the time; this moves trigger2 only when your player touches the trigger1
trigger2 = getEnt("trigger_hurt","targetname")

trigger1 waittill("trigger") //waits until the trigger1 is triggered

trigger2 moveZ(12, 2, 2, 5);
}

/*
Explanation:
moveZ = move up or down
12 = units to move (+ = up, - = down)
2 = movement acceleration (seconds)
2 = movement decceleration (seconds)
5 = the time it does all the moving
*/

Re: Moving triggers?

Posted: July 27th, 2010, 8:28 am
by <LT>YosemiteSam[NL]
You can also read this m8;

viewtopic.php?f=19&t=3538

Re: Moving triggers?

Posted: July 27th, 2010, 8:30 am
by csikon210
Thanks:D wait other question replies:)

Re: Moving triggers?

Posted: July 27th, 2010, 9:39 am
by csikon210
I wait answears for cod 1 !

Re: Moving triggers?

Posted: July 27th, 2010, 11:58 am
by waywaaaard
Ok in vcod1 you need to

Code: Select all

trig = getEnt("blabla", "targetname");
brush = getEnt("djklsdjfk", "targetname");

trig enableLinkTo();
trig linkTo(brush);

brush moveZ(...);
you need to enable the linkto and then just link your trig to a brush and move the brush the trigger will be moved with the brush