Are you sure the zombie_spawns are really in the array ( check with a print if it actually returns an origin for example )
Also this doesn't really make sense:
Code Snippet
Plaintext
for(i = 0; i < zombies.size; i++) { for(k = 0; k < level.zombie_spawns.size; k++) { zombies[i] setorigin(level.zombie_spawns[i].origin); } }
I'm missing the [k] value in here? So you either want to remove the:
Code Snippet
Plaintext
for(k = 0; k < level.zombie_spawns.size; k++)
from there, or otherwise make it use the [k] value but doing so, that would prob move one zombie to all spawn points in the map. One after another, because the for() loop keeps going allong all spawn point's before it continues with the next zombie.. Might want to try something like this for the last part:
Now this would move them all to the first spawn-point in the array prob, (because it's Always defined) it's up to you to change the statement's to your need's or randomize the array or something..
Also according to zeroy's script reference the setorigin() is used for the players origin, dunno if it makes a difference for zomb's. You could try just doing
Are you sure the zombie_spawns are really in the array ( check with a print if it actually returns an origin for example )
Also this doesn't really make sense:
Code Snippet
Plaintext
for(i = 0; i < zombies.size; i++) { for(k = 0; k < level.zombie_spawns.size; k++) { zombies[i] setorigin(level.zombie_spawns[i].origin); } }
I'm missing the [k] value in here? So you either want to remove the:
Code Snippet
Plaintext
for(k = 0; k < level.zombie_spawns.size; k++)
from there, or otherwise make it use the [k] value but doing so, that would prob move one zombie to all spawn points in the map. One after another, because the for() loop keeps going allong all spawn point's before it continues with the next zombie.. Might want to try something like this for the last part:
Now this would move them all to the first spawn-point in the array prob, (because it's Always defined) it's up to you to change the statement's to your need's or randomize the array or something..
Also according to zeroy's script reference the setorigin() is used for the players origin, dunno if it makes a difference for zomb's. You could try just doing
Dunno, i tried using it once and didn't seem to work for me either. Then i checked the dlc3_teleporter.gsc in raw\maps and looked how they teleported the players in there and applied that to my zombies. Basicly they spawn a script_origin, link the player to it, set a new origin for the script_origin and then unlink the player again, and delete the script_origin.. That should work..
Teleport() does work. It just doesn't teleport when the player might be able to see the teleportation process. That's what ForceTeleport() is for, which is used for the dogs for example. It does work.
Teleport() does work. It just doesn't teleport when the player might be able to see the teleportation process. That's what ForceTeleport() is for, which is used for the dogs for example. It does work.
- Phil.
Ok, that might have been my problem. I never tried Forceteleport() be cause i didn't know it existed back then, i went straight to the dlc3 script..
Teleport() does work. It just doesn't teleport when the player might be able to see the teleportation process. That's what ForceTeleport() is for, which is used for the dogs for example. It does work.
- Phil.
Well i'm out of ideas then unless i can get the linking method to work(which it isn't so far). I don't see why the forceteleport() isn't working, i have all the entities but they just won't move.
Well i'm out of ideas then unless i can get the linking method to work(which it isn't so far). I don't see why the forceteleport() isn't working, i have all the entities but they just won't move.
So did you try to print one of your zombie_spawns on screen to see if it actually has an origin stored in there? Maybe that's wrong..
Last Edit: May 03, 2014, 03:59:01 pm by BluntStuffy