UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: greenlungs81 on August 28, 2013, 10:50:51 am

Title: script for teleporting zombies
Post by: greenlungs81 on August 28, 2013, 10:50:51 am
i need a script for teleporting zombies can someone plz help
Title: Re: script for teleporting zombies
Post by: DeletedUser on August 28, 2013, 11:37:13 am
http://pastebin.com/ck2HqpUR (http://pastebin.com/ck2HqpUR)
Code Snippet
Plaintext
zombie_teleport(){
triggerPlayer = getEnt("player_zombie_trigger","targetname");
triggerZombie = getEnt("zombie_zombie_trigger","targetname");
targetTeleport = getStruct("zombie_teleport_target","targetname");
while(1){
triggerPlayer waittill("trigger");
zombieArray = GetAIArray("axis");
for (i = 0;i<zombieArray.size;i++){
if(zombieArray[i] isTouching triggerZombie){
zombieArray[i] Teleport(targetTeleport.origin, (0,0,0));
iPrintLn("Zombie  "+i+" has been teleported to origin: "+targetTeleport.origin);
}
}
}
}
How script works:
1) When player enters trigger multiple or uses trigger use with targetname "player_zombie_trigger" the script gets all zombies on the map
2) When zombies are touching the trigger multiple with targetname "zombie_zombie_trigger" they are being teleported to script struct with targetname "zombie_teleport_target" and the info what zombie has been teleported to the script struct and also gives info where is the struct appears
Hope this helped.
EDIT: You need to paste this into your map's gsc file and type
thread zombie_teleport();
after
maps\_zombiemode::main();
Title: Re: script for teleporting zombies
Post by: daedra descent on August 28, 2013, 12:01:03 pm
http://pastebin.com/ck2HqpUR (http://pastebin.com/ck2HqpUR)
Code Snippet
Plaintext
zombie_teleport(){
triggerPlayer = getEnt("player_zombie_trigger","targetname");
triggerZombie = getEnt("zombie_zombie_trigger","targetname");
targetTeleport = getStruct("zombie_teleport_target","targetname");
while(1){
triggerPlayer waittill("trigger");
zombieArray = GetAIArray("axis");
for (i = 0;i<zombieArray.size;i++){
if(zombieArray[i] isTouching triggerZombie){
zombieArray[i] Teleport(targetTeleport.origin, (0,0,0));
iPrintLn("Zombie  "+i+" has been teleported to origin: "+targetTeleport.origin);
}
}
}
}
How script works:
1) When player enters trigger multiple or uses trigger use with targetname "player_zombie_trigger" the script gets all zombies on the map
2) When zombies are touching the trigger multiple with targetname "zombie_zombie_trigger" they are being teleported to script struct with targetname "zombie_teleport_target" and the info what zombie has been teleported to the script struct and also gives info where is the struct appears
Hope this helped.
EDIT: You need to paste this into your map's gsc file and type
thread zombie_teleport();
after
maps\_zombiemode::main();

Would a zombie use this to get closer to the players, as if it was the most direct way of getting to the them?
Title: Re: script for teleporting zombies
Post by: greenlungs81 on August 28, 2013, 02:28:50 pm
dont work
Title: Re: script for teleporting zombies
Post by: DeletedUser on August 28, 2013, 02:56:40 pm
dont work
Did any text showed up?
Title: Re: script for teleporting zombies
Post by: jjbradman on August 28, 2013, 11:46:03 pm
is this supposed to work like five? if it does i might be making a five remake!! \:D/
Title: Re: script for teleporting zombies
Post by: SajeOne on August 29, 2013, 01:44:41 am
i might be making a five remake!! \:D/
Please don't, put your creativity into something new, not something I could open up and play now.
Title: Re: script for teleporting zombies
Post by: Psych on August 29, 2013, 01:57:14 am
Please don't, put your creativity into something new, not something I could open up and play now.

LOL! Right on and well said!
Title: Re: script for teleporting zombies
Post by: jjbradman on August 29, 2013, 05:20:58 am
Please don't, put your creativity into something new, not something I could open up and play now.

well but anyways i would like to get the five script as all the map ideas i have use elevators and this might be helpful :)
Title: Re: script for teleporting zombies
Post by: greenlungs81 on August 29, 2013, 07:51:40 pm
ray i told you what the error was  thread zombie_teleport();
i did everything you said