Posts
106
Respect
18Add +1
Forum Rank
Pack-a-Puncher
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!// Coded by YaPh1l
// Date: 09. October 2013
#include maps\_utility;
#include common_scripts\utility;
#include maps\_zombiemode_utility;
// 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()
{
locations = GetStructArray("tornado_location", "targetname");
iPrintLn("Tornado locations found: " + locations.size);
last_location = Random(locations);
fx = Spawn("script_model", last_location.origin);
fx SetModel("tag_origin");
PlayFxOnTag(level._effect["tornado"], fx, "tag_origin");
while(true)
{
while(true)
{
locations = array_randomize(locations);
if(locations[0] != last_location) break;
}
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];
}
}
level._effect["tornado"] = LoadFx("tornado_fx");
