This is the tutorial: http://www.modsonline.com/Tutorials-read-266.html
This is the script that i use.
Code: Select all
main()
{
setCullFog (0, 8000, 0.8, 0.8, 0.8, 0);
ambientPlay("amb_burnville");
maps\mp\_load::main();
maps\mp\_load::parachute();
level._effect["fire"] = loadfx ("fx/fire/tinybon.efx");
maps\mp\_fx::loopfx("fire", (-157, 435, 30), 0.6);
level._effect["smoke"] = loadfx ("fx/smoke/ash_smoke.efx");
maps\mp\_fx::loopfx("smoke", (-157, 435, 85), 0.7);
game["allies"] = "american";
game["axis"] = "german";
game["american_soldiertype"] = "airborne";
game["american_soldiervariation"] = "normal";
game["german_soldiertype"] = "fallschirmjagercamo";
game["german_soldiervariation"] = "normal";
game["attackers"] = "allies";
game["defenders"] = "axis";
}
Code: Select all
parachute()
{
level.player allowProne (false);
level.player allowCrouch (false);
start = level.player.origin;
startheight = start[2];
level.player.origin = level.player.origin + (0,0,0);
parachute = spawn ("script_model",(0,0,0));
parachute setmodel ("xmodel/parachute_animrig");
parachute.origin = level.player.origin;
level.player linkto (parachute,"TAG_player",(0,0,0),(0,0,0));
while (1)
{
wait 0.05;
direction = (0,0,-9);
parachute.origin=parachute.origin+direction;
start = level.player.origin;
end = start + (0,0,-64);
hitcharacters = 1;
results=[];results=bulletTrace(start,end,hitcharacters,level.player);
if (results["fraction"]!=1)
{
level.player.origin = results["position"];
level.player unlink();
level.player allowProne (true);
level.player allowCrouch (true);
break;
}
}
parachute hide();
}
Hope some one can see the problem.