






Trigger_If is a entity that allow you to use if statement on lua scripts

Put Trigger_If on your map, fill the "name", "trigger", and Condition. Condition can be this way

or you can see 2 examples at there
then link it with a Trigger_Use, Hit, Move, etc.

1. create 2 CT spawnpoint with different name(ct1 and ct2) and 1 T spawnpoint(to prevent crash)
2. create Func_DynWall and 2 Trigger_Use(1 trigger CT spawnpoint(ct2) and another to trigger the Trigger_If)


3. Create Trigger_If and Fill the condition this way:

1
entity(2,0,'state')==true









4. Make sure that Trigger_If trigger the Func_DynWall and 1 Trigger_Use trigger the Trigger_If
5. Save the map and test it. And make sure there is a 6 bots with CT
6. It should spawn on 2 spawnpoint
7. okay go to Trigger_Use that linked to Trigger_If and press "Use" key
8. If it works fine the door should not open, go to Trigger_Use that linked to Info_CT(with name ct2) and press "use" key
9. Try to kill yourself 10 times to MAKE sure that there is a only 1 spawnpoint
10. If it works fine you should ALWAYS spawn on Info_CT(with name ct1)
11. Repeat step 7 and see if it works. If it works fine the door should open
12. If it open you did it right, but if not seems that you did something wrong. Retry again the tutorial













1
dofile("<Luapath>")







edited 5×, last 08.08.12 01:38:42 pm