Scripted trigger
Moderator: Moderators
Scripted trigger
How do I make it so that when you press the use key at a trigger it starts a command on my script?
try a use trigger
like this
like this
Code: Select all
my_use_trigger_thread:
local.usetrg = spawn trigger_use
local.usetrg.origin = ( x x x ) //put coordinates here
local.usetrg setsize ( -x -x -x ) ( x x x ) // set size of trigger here
local.usetrg targetname usetrg
while(1)
{
$usetrg waittill trigger
//do stuff here
}
end- Axion
- Major General
- Posts: 683
- Joined: Mon Sep 29, 2003 5:14 am
- Location: Northern California
- Contact:
If you want a trigger to create its own thread in your script, you can give it a key/value of setthread/name of your thread. For example, if you had a trigger_use to open a door and you wanted to script conditions on how and when the door should open, you could give your trigger a key/value of setthread/door_conditions. Then in your script, you would make a thread called door_conditions that would contain the scripting that would control the door.Firefox wrote:Is there a ommand in radient (on the trigger) to link to a script line in the script?
or do i just right in
target my_use_trigger_thread
for the script above?
I hope that made sense. It's been a little while since I've posted, and I might be rusty.
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:

