Jump to content
Sign in to follow this  
Pillowtap

Can I give UPSMON to spawned vehicles?

Recommended Posts

Is it possible to give UPSMON to units spawned using bis_fnc_spawnvehicle? I finally learned how to spawn vehicles today using that, but haven't been able to figure out how to enable UPSMON on said vehicles.

I have a H (invisible) that serves as the spawn location named Spawn1 and a trigger that activates when BLUFOR is detected by OPFOR with this in the on act field: [getPos Spawn1, 180, "BMP3", EAST] call bis_fnc_spawnvehicle;

It causes the BMP3 to spawn just fine, but it just sits around doing nothing. I know how to give it waypoints, but I would prefer it to use UPSMON and navigate to the marker on its own and begin patrolling. I also have the H (invisible) set to 40% probability chance just for a little randomness. Even if the player is detected he may or may not have a BMP3 coming his way.

Edited by Pillowtap
I meant to use the happy post smiley face!

Share this post


Link to post
Share on other sites

This should do the trick :-

it will spawn @ spawn1 then place a marker whatever size called marker_armour and it will drive to that marker then patrol around it

_armourgrp1 = [getpos Spawn1, EAST,["BMP3", "BMP3"],[[-3,-3], [3,3]]]  call BIS_fnc_spawnGroup;
[(units _armourgrp1) select 0, "marker_armour","spawned","delete:",120] execVM "scripts\upsmon.sqf";

Edited by psvialli

Share this post


Link to post
Share on other sites

Thanks for the help! It works perfectly. I had some trouble at first but putting it inside init.sqf instead of a trigger solved everything. Is it possible to modify this to work from a trigger?

Edited by Pillowtap

Share this post


Link to post
Share on other sites

Yes just make a .sqf and put this in:-

spawnexample.sqf

if isserver then {

_armourgrp1 = [getpos Spawn1, EAST,["BMP3", "BMP3"],[[-3,-3], [3,3]]]  call BIS_fnc_spawnGroup;
[(units _armourgrp1) select 0, "marker_armour","spawned","delete:",120] execVM "scripts\upsmon.sqf";

};

On trigger

set activation to whatever you like

on act put this

null = [] execVM "spawnexample.sqf"

that should do the trick

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  

×