// Call after _zombiemode::main() init() { level._effect["tornado"] = LoadFx("tornado_fx"); level.fx_move_speed = 10; // units per second level thread fx_move_think(); }
for(i = 0; i < locations.size; i++) { iPrintLn("Moving to: (" + locations.origin[0] + "|" + locations.origin[1] + "|" + locations.origin[2] + ")"); dist = Distance(locations.origin, fx.origin); time = (dist / level.fx_move_speed); fx MoveTo(locations.origin, time); wait(time); }
last_location = locations[locations.size - 1]; }
this might work , maybe not and maybe the game will restart if the player dies i cant be sure because i cant test it
I have never used the function suicide(), if you are sure it works then ok. As for your method of checking the player's interception with the structs, it is not a very good way to perform this task. The tornado FX will be huge, you would have to get to the very center of it for anything to happen. A better solution would be to check the player's squared distance to the struct, that way you can change the value of how far the player needs to be. Ensuring the player is actually hurt when he touches the FX, not just the struct. You are also only checking for it within the init() function which means it will only be called once for each time the init() function is called(which is once). Seeing as within one of the loops there is a wait for the FX's moving time the script would likely have to go through further changing to have a constant player check.
As for your method of checking the player's interception with the structs, it is not a very good way to perform this task.
I think it even is impossible. What I mean is, I think IsTouching() does not accept script_structs, as they do not have any physical size in the map. Also, I am not sure, but I think Suicide() will cause an immediate map restart in Coop.
I think it even is impossible. What I mean is, I think IsTouching() does not accept script_structs, as they do not have any physical size in the map. Also, I am not sure, but I think Suicide() will cause an immediate map restart in Coop.
- Phil.
but he can try by attaching a damage brush to the location struct, cant he? .-.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
I'll admit I've only read the most recent replies, but what you need to do is spawn a trigger_radius from script and use that to detect when players should get hurt. Then you handle the damage with doDamage().
Unless the damage is deadly, in which case you want to use RadiusDamage() with a very small radius (10) at the player's origin, because deadly amounts of damage inflicted via DoDamage() cause a map restart in Coop.
- Phil.
Last Edit: January 29, 2014, 07:53:52 pm by YaPh1l
Unless the damage is deadly, in which case you want to use RadiusDamage() with a very small radius (10) at the player's origin, because deadly amounts of damage inflicted via DoDamage() cause a map restart in Coop.
- Phil.
why with such an small radious phil? o.O
just make a trigger_multiple covering where you want players to get killed edit: nevermind i quit here i commented out some lines that might be usefull if you want to continue with this
// Call after _zombiemode::main() init() { level._effect["tornado"] = LoadFx("tornado_fx"); level.fx_move_speed = 10; // units per second level thread fx_move_think(); }
fx_move_think() { damage_radious = 10 player = undefined //-------------------------------
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
and in the second one bad syntax xDDDD player = function thats the error ahaha EDIT: Sorry i think it has been my fault, im compiling again RE EDIT: Sorry again I wasnt wrong i got that error ^
Last Edit: January 29, 2014, 09:00:56 pm by javipotter