Hello guys. Today I have made an awesome script. It is where you use a trigger, survive rounds, and then a door opens. Here is how to use it.
Here is the script:
Go into "mapname.gsc" and underneath "maps\_zombiemode::main();" add "maps\_survive_rounds::main();". Make a new ".gsc" file and place the script above into it. Call it "_survive_rounds.gsc". Place the script into "Root/mods/mapname/maps". Then go into Radiant and open your map. Everything will be set up using KVP's, like a real zombie_door. It may get a bit complex, but I'll try to do my best to explain. First make a trigger_use. Give it this initial KVP. targetname = rounds_survive_doors
First add "script_noteworthy". Now all you need to add in this KVP is the number of rounds you need to survive for this trigger. Now if you want cost, add this as another KVP: "zombie_cost". Set any value for a cost, and the hintstring will adjust. If you dont want cost, DONT add this KVP at ALL. That way the hintstring will not have any cost listed on it and will not play the "cha-ching" sound on use. Next if you want a flag to set after the door is open like to activate a zone, add "script_flag" as a KVP. Then type the name of the flag you want to be set. Finally add the KVP "target". Then type a Key you will remember to array to the doors that will open. Once you use one trigger in game, all other triggers will disable so you cannot activate multiple "survive round" modes at once. They all re-enable once there is no "survive rounds" mode active. Now to set up the doors. Each trigger can open as many doors at once as you want. Each door you want to be opened will be targeted by the trigger. That means the door's initial KVP will be this: targetname = (TRIGGER'S_TARGET_KVP)
I hope that makes sense, because I can't think of a better way to say that. Now to set up how the door will open once told to open. If you want the door to just delete without doing anything, just leave it alone after adding the targetname. If you want the door to look more professional and move on open, do the following. Add a new KVP called "script_vector". Now type in this "0 0 0". This is just like setting up a normal door's script_vector. The first "0" will be the door's X-Axis Move. You can type negative or positive numbers to make the door move forward or backward. The middle "0" will be the doors Y-Axis Move. You can type negative or positive numbers to make the door move left or right. The last "0" will be the door's Z-Axis Move. You can type negative or positive numbers to make the door move up or down. After setting your values make sure there is only one space between each number and no spaces before or after. I hope that made sense to you, I dont know a better way to explain it. Now add a new KVP called "script_transition_time". Set it to how long you want it to take for your door to open. If you dont set this KVP, the time will default to 2 seconds for sound sync. Now add a new KVP called "script_noteworthy". Here you will either set it to "solid" or "delete". If you set it to "solid", after the door is done moving, it will just remain solid where it is on your map. If you set it to "delete", after the door is done moving, it will delete of your map.
That's all. Remember if you dont set a "script_vector" for your door, it will just delete on open. You can make as many trigger's and doors for the trigger's to open as you want. I hope this tutorial made sense since there is so much to explain. Remember in Mod Builder, Select the following before you Build Mod: maps/_survive_rounds.gsc maps/mapname.gsc
Remember to credit me if you use this. Thanks and peace out. By the way for those wondering, my real preferred name is xSanchez78.
Last Edit: January 15, 2015, 10:20:44 pm by alaurenc9