Somerville 0 Posted May 10, 2007 Hi there, I've got an empty tank that I want to be randomly positioned in a marker. Then when it dies, I want it to be randomly positioned again, but on full health. I could probably manage the second bit, but the first bit is really winding me up >< Any ideas? Share this post Link to post Share on other sites
HulkingUnicorn 0 Posted May 15, 2007 You want it to be randomly placed at mission start? Set placement radius to match the size of the marker and place the empty tank on top of the marker. For the second, use addEventHandler (killed variant) and put createVehicle_array as the activation code. Share this post Link to post Share on other sites
Somerville 0 Posted May 25, 2007 Okay, I'm a bit unsure of how to actually put this down in the editor.. I've got the placement radius sorted, but what about the other bit? Could you possibly do a step-by-step thing for me? Pweeeese? Share this post Link to post Share on other sites
456820 0 Posted May 25, 2007 Place invisible H pads as to where you want the tank to spawn. Then use an even handler... this addEventHandler ["killed", {[] exec "killed.sqs"}] ;Killed.sqs ; a few seconds delay to acknowledge that its been destroyed. ~7 _rand = random 3 ? _ rand <= 1 : tank setdammage 0; tank setpos getpos Hpad1 ? _ rand > 1 or _rand <= 2 : tank setdammage 0; tank setpos getpos Hpad2 ? _ rand > 3: tank setdammage 0; tank setpos getpos Hpad3 exit That should do the trick nicely. Btw you might need to add the event handler once its been killed not sure really, presumably you would since when its been killed there would be no need of the EH since its dead but a quick test should show you. Share this post Link to post Share on other sites