kutya 0 Posted March 5, 2007 I have a problem and I need help from you guys. What I try to do, is to make a script that brings off map units to a certain area (say, a base). They should be reinforcements. I don't know where the player will be in the moment when I plan to bring reinforcements to the base, so my idea is to somehow spawn them off-map get them in a heli and the heli would bring them to the base. But I have problems, because the heli crashes before it starts flying. Is there a way to spawn a flying heli, or has someone an idea how could I solve this? It would be the easisest to spawn the units and the heli on a far island, and bring them to the desired coordinate, but as I said I don't know where the player will be, when I'll spawn the squad, and also if the player is near the base, I'd like him to see that the heli is arriving from "somewhere else" (off the map). What I want to avoid is that the player to seeing the enemy reinforcements materializing at the enemy base (or the friendlies at ours). A solution would be best, but ideas are also welcome. Share this post Link to post Share on other sites
sanctuary 19 Posted March 5, 2007 A simple workaround, performance friendly, as long as you don't see the chopper spawning, and the 8/10 following seconds (+/- the time it takes for the chopper engine to allow it to fly without the setvelocity rebounds). Easy to adapt. [GAMELOGICNAME] exec "nameofthescript.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_loc = _this select 0 HEL1 = "UH60" createvehicle getpos _loc; removeallweapons HEL1 HEL1 setpos [(getpos HEL1 select 0), (getpos HEL1 select 1), 80] "soldierWPilot" createUnit [getpos player,group player,"PIL1=this;",1,"PRIVATE"] [PIL1] join grpnull; PIL1 moveindriver HEL1 tm=0 PIL1 move getpos PIL1 #miniloop ? tm >= 6 : goto "endit" HEL1 setvelocity [0,0,10] HEL1 setdir getdir HEL1 ~2 tm=tm+1 goto "miniloop" #endit PIL1 move getpos player exit Share this post Link to post Share on other sites
kutya 0 Posted March 5, 2007 How simple, but I wouldn't ever think of it ... Share this post Link to post Share on other sites