Muscular Beaver 0 Posted February 1, 2003 Cause of lag problems I wanted to let some objects, vehicles and units only appear when a trigger is activated. I think I learned how to do this, but I also want them to complete a few waypoints. how can I do that? Share this post Link to post Share on other sites
Taurus 20 Posted February 1, 2003 it has been discussed here: http://www.flashpoint1985.com/cgi-bin....t=17511 A very problematic task, it seems. I have managed to spawn new troops(with help from KaRRiLLioN), forced the new troops to follow waypoints, but now, I can only spawn the troops once. Share this post Link to post Share on other sites
Muscular Beaver 0 Posted February 2, 2003 thank you. is it possible to add the azimut to the createunit command? Share this post Link to post Share on other sites
Taurus 20 Posted February 2, 2003 It could be done(in SP for sure, can't be done in MP) in the init field e.g. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">"SoldierWB" CreateUnit [(GetPos GameLogic1), UnitGroup1,"This SetDir 90", 1.0, "PRIVATE"]<span id='postcolor'> Where: "This SetDir 90" is the init-field of the unit created Cold War Crisis 1.46: My recent observations about spawning(creating) units in MP is that, it does not care about if you use CreateUnits, with all it's parameters it creates the unit using CreateVehicle which place an empty soldier in the game, which you can't do nothing about, can not make any references what so ever. Only "true" vehicles such as Cars, armored, planes and others can be referenced. e.g. _dude="SoldierWCrew" createVehicle (GetPos GameLogic1) _dude returns : no group _tank="M60" createVehicle (GetPos GameLogic1) _tank returns: hex-value  NOID m60 Share this post Link to post Share on other sites
Rokket 0 Posted March 28, 2004 This is probably old news (and too late to help Beaver and Taurus), but I've figured out a semi-simple way to create units with waypoints: Do the usual to create a unit  - there's a great tutorial at OFPEC, but: drop a single unit somewhere out of the way (call him, say JOE), like one of the micro islands on Tonal that are the size of a house; give him a group name, place a GameLogic where you want the created units to appear, use a trigger to create the units by putting this in Activation:"soldeirEB" createunit [getpos GAMELOGIC, TRIG NAME, "newunitname=this"]; repeat for as many soldiers as needed;deletevehicle JOE. When trigger, trigger will createunit(s), assign them to JOE, then delete JOE. Here's the waypoint trick: just give JOE waypoints. Like MOVE and GUARD. He can never reach his waypoints because he's stuck on a micro island (or for maps without, you could break his legs by setdammaging him to .9 - poor Joe!). New units created and assigned to him, he's deleted, and they continue on to the waypoints. Share this post Link to post Share on other sites