Posts
69
Respect
59Add +1
Forum Rank
Rotting Walker
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!Hey guys, here is a simple script to add ways to teleport zombies in your map. So lets say you have a map with multiple zones and those zones are spaced apart, normally you would need to have a way for the zombies to get to the other like a hidden tunnel or something, this script is a good replacement for that. Here's a quick vid of it:
(Content removed from quote.)Spoiler: click to open...Radiant
The setup for this is very simple. The zombies need to be able to path to the area they are teleporting too. This can be done in a bunch of different creative ways such as using player clips or setting walls to non-colliding.
- First create a trigger_multiple and give it this KVP "teleport_zombies" - targetname.
- Now create a script origin and place it halfway into the ground. Open the KVP's and set it to server. Now deselect everything, select the trigger first, then select the script_origin and hit W. What this will do is set the script_origin's targetname to an auto generated name so it can be copied without sharing targetnames.
- Now you should see a line connecting the trigger to the origin. Double check to make sure its the trigger_multiple targeting script_origin and your good to go.
- To add multiple teleporters just select the trigger and the origin and hit space. Check the kvp's to make sure the targetname on the origin is different from the targetname on the other origin and your done with radiant.
Here is an example of how i have mine setup, the clip is a clip_ai and not a player clip so only the zombies can cross that path.
Scripting
The scripting is extremely simple. Just open your mapname.gsc and copy this code.Spoiler: click to open...[close]
- Paste that code into the bottom of your mapname.gsc.
- Now at the bottom of the main function paste this - It should look something like this:
Now your done! Make sure when setting this up that the zombies are able to path to the destination otherwise they wont go into the portals. Also make sure to space the origin away from the portal a bit to avoid an infinite loop.
Let me know if you guys would like more simple scripting tutorial's like this.[close]
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
Yeah cool TUT
Now my question, how can i do this teleport with walls at all 4 sides, like a room ?
the zombies wont go into the portals ?
thanks man