Jump to content
Sign in to follow this  
fortun

Spawn a unit on different position every time you load mission?

Recommended Posts

Im doing a "Kill the General" task, where you are supposed to find and kill a unit. I want him to spawn in some houses, but never the same so you never know where he will be. How am i able to do that?

Share this post


Link to post
Share on other sites

you can spawn an object or soldier at different locations by grouping the soldier/object with one or more empty markers.

you still would need to get the unit into a house. don't know if there are new possibilities in arma 3 , but in arma 2 you would need some basic scripting in the units init, basically getting name/id of nearest enterable building and then moving the unit or object to random position inside that building. it's easy, but i don't know the scripting commands for this (try to use forum search), but perhaps the thing with the markers still helps.

*edit*

try putting this in units init-line.

this setPos ((nearestBuilding this) buildingPos 1)

you could then try to randomize the position in the building. with this it will always be the "first" position ( buildingPos 1) in the nearest building.

please note: that all might totally not work. i did not test it and i'm not good even with the most basic scripting...

Edited by twistking

Share this post


Link to post
Share on other sites

Hmm. Can't group soldiers with markings, when going to group or sync, the markers disappear.

The best thing would be if i could place the soldiers where i want them to be, then that i could somehow have Init script where it chooses between every soldier where he should be. Because in A3 i you can set the elevation of the unit so he could be upstairs and so. And would be nice do have preset positions and that it chooses between one of them.

Share this post


Link to post
Share on other sites
Hmm. Can't group soldiers with markings, when going to group or sync, the markers disappear.

i know, that is stupid, but should work nevertheless.

just create the marker and remember its position, then drag the group-line from the unit to the position. when you are over the position of the invisible marker a tooltip should appear (name of the marker). its stupid, but it works. often it helps to zoom out a bit, because then you don't have to be that precise when finding the invisible marker.

i can't really help you with the building position thing. there are endless ways to do basically what you want, but sadly i don't know the commands and correct syntax. hope someone else can come up with the solution!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×