Forum Jump :

Author Message

Blitz  



Posts: 2
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name: Sol.PvtBlitz

 
#1 Posted at 2014-06-07 15:47        
     
Hey Community,

in my script I need to get the name of a trigger, but I can not find any command or method for this on the BI website.
I hope somebody can help me with my problem!


Author Message


Posts: 56
Rank:


Level: Member

Country: au
Location: Mid North Coast
Occupation: Personal Care Assistant
Age: 42
In-game name:

 
#2 Posted at 2014-06-07 16:29        
     
You have to name it in the script like this.
Cb0Trig = createTrigger["EmptyDetector",getMarkerPos "CbMkr0"];
SO this trigger is named Cb0Trig.
When naming stuff try and make it make sense so for example the above stands for Car bomb 0 trigger. :)
If its an editor placed trigger just name it in the name box in the trigger's setup panel.


Advertisement


Author Message

Blitz  



Posts: 2
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name: Sol.PvtBlitz

 
#3 Posted at 2014-06-07 18:09        
     
I is an editor placed trigger but I had a brainstorm: I just have to give the script the Name via an argument at the activation of the script.


Author Message


Posts: 56
Rank:


Level: Member

Country: au
Location: Mid North Coast
Occupation: Personal Care Assistant
Age: 42
In-game name:

 
#4 Posted at 2014-06-07 18:48        
     
If you have named it in the editor you can just call it in the script like if you wanted to attach the trigger to a car you would name the car for example Car_1 and the the trigger Trigger_1
then in the script put-

Trigger_1 attachTo Car_1;

Then you have a moving trigger :)






Tags: Get, Name, Trigger