Jump to content
Sign in to follow this  
Mirek

This this setPosATL doesnt work with murkspawn

Recommended Posts

Hi

Iam creating a mission, and i want units to spawn on trigger, so i do not put too much stress on my computer by having all the units spawned at once in mission. There is a problém however with units in buildings.

I use "this setPosATL" command to put units in buildings that works ok until i add a murkspawn line to the units init line. Murkspawn works, units are spawning upon triggercatch, but units in buildings are spawning on the roof of the building and then they are dieing as they try to folow theyr waypoints by jumping of the roof.

Can anyone give me advice?

Share this post


Link to post
Share on other sites

The solution i found is , don't put codes in unit init line when using murkspawn script. intense add a short waypoint to unit and in waypoint init add ur codes.

My way to fix problem:

Create trigger radio alpha to get pos and in on act:

if (isnil "p") then {p = []}; p set [count p,getposasl player]; copyToClipboard str p

it copy my current position like inside building."[[2494.95,1924.8,55.4837]]"

Put unit and add normal murkspwan script code line."i think you should know how it work"

nul = [this,"trigger1","once"] execVM "murk_spawn.sqf"; 

Add a waypoint to unit like move and on act waypoint line i will put code

if isserver then {    private ["_pos","_arr"];    _arr = [[2494.95,1924.8,55.4837]];    _pos = _arr select floor random count _arr;    this setposasl _pos; this setFormDir 350;  };

"this setFormDir 350;" is which side unit looking. use compass in game to get side degree.

Or for statics, same problems, so i put a empty static and name it: static1

Then put a unit and add a waypoint to unit and in ON ACT waypoint:

this moveinGunner static1

Share this post


Link to post
Share on other sites

THX man

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  

×