Executing a Trigger Multplie function by Script

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Executing a Trigger Multplie function by Script

Post by mcunha98 »

Hi,

I read the Nemesis Tutorial's found in http://users.1st.net/kimberly/Tutorial/plane.htm, and he is work correctly, with a little exception.

For show the plane, is need execute the trigger multiple indicate in tutorial, my question is how i execute in my script file, the Trigger Multiple function in times (sample, each 30 seconds, show the plane into screen -- for this, executing trigger multiple action --).

Thanks !
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Place this in a seperate thread.

Code: Select all

while(1)
{
  $targetnameofplanetrigger activatetrigger $world
  wait 30.0
}
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

BIG JV !!!

This code dont work... :cry:
Some idea...

Well, i make a function the mymap.scr and call he, but he work like old style, when i use (E) the multiple trigger, ok, plane appear, but i wait 30 seconds to view the plane again and nothing...
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

play around with these a little bit,im sure u just change a couple things and u can get it to work.these are just examples on what u can do by scripting a trigger.

local.trig = spawn trigger_multiple

local.trig.origin = ( -1864.26 944 12.03 ) // This is where you place the cords you have.

local.trig setsize ( -10 -10 -10 ) ( 10 10 10 ) //The way this works is it defines the box size. (the larger the numbers the larger the area)

//Directions for the size(south east down) (north west up) I believe these are in inches

local.trig setthread Trigger1 //Name of thread.

local.trig message "You are touching Trigger1" //This is what flashes on the players screen when they are on the trigger.

local.trig wait 1 // How often the trigger repeats itself.

local.trig delay 0 // How long before trig acts.



Trigger1: //This is the name of the thread you defined earlier in setthread.

self waittill trigger //Tells it to wait until the trigger is set off and is something you will never change.

local.player=parm.other //Something you will never change.

if (local.player.isTrigger1==1) //Change this to the name of the thread, in this case Trigger1.

end //This defines the end of this thread.



local.player.isTrigger1=1 //Since we made the player turn on the trigger, this says what to do once it?s turned on.

local.player tele 0 0 900 // This is where you execute the command. You never change the words ?local.player?.

wait 5 //If you want 2 commands to execute per trigger this is the pause between them.

local.player kill // This is where you execute the 2nd command. You never change the words ?local.player?.

local.player.isTrigger1=0 //Again make sure this has the name of the thread above for it to work.

end //This defines the end of this trigger.
Image
Post Reply