Jump to content
Sign in to follow this  
last_apoc

Create custom unit on trigger activation

Recommended Posts

I am trying to make a certain unit spawn on trigger activation.

When I paste the example lines from http://community.bistudio.com/wiki/createUnit into the on act. box nothing seems to happen. What am I doing wrong?

Ultimately what I want is to spawn a custom plane I downloaded (with pilot) preferably into his own group whenever the player enters a certain trigger area.

(But for now just spawning anything on trigger activation will at least give me some sense of progression here...)

Also, before I get reamed out for this, yes I searched. I searched the Biki, I searched the forums, I searched armaholic.

Share this post


Link to post
Share on other sites

You should look at using this:

BIS_fnc_spawnGroup

Make sure you put a functions module down on your map.

On Trigger Act.

mycustomplanegrp = [getMarkerPos "myplanespwn", east, ["myplane"]] call BIS_fnc_spawnGroup;

Share this post


Link to post
Share on other sites
I am trying to make a certain unit spawn on trigger activation.

When I paste the example lines from http://community.bistudio.com/wiki/createUnit into the on act. box nothing seems to happen. What am I doing wrong?

Ultimately what I want is to spawn a custom plane I downloaded (with pilot) preferably into his own group whenever the player enters a certain trigger area.

(But for now just spawning anything on trigger activation will at least give me some sense of progression here...)

Also, before I get reamed out for this, yes I searched. I searched the Biki, I searched the forums, I searched armaholic.

It would help if you posted exactly what you have done and how you are trying to do it, so people could point you in the right direction as there are quite a few ways to spawn units.

Share this post


Link to post
Share on other sites
It would help if you posted exactly what you have done and how you are trying to do it, so people could point you in the right direction as there are quite a few ways to spawn units.

Alright, what I have so far is this:

trigger.th.png

They way I plan to do it is quite dirty, but I'm really new to editing. It will just be, Once the player has been in the area for 300 seconds, a new plane will spawn for him to fight.

Share this post


Link to post
Share on other sites
When I paste the example lines from http://community.bistudio.com/wiki/createUnit into the on act. box nothing seems to happen. What am I doing wrong?

but by your last picture you have nothing???? did you even try anything?

anywho, what you need is BIS_fnc_spawnVehicle, since its a vehicle you are trying to spawn.

also on a second note, set the middle timeout value to 300 aswell, not sure if needed, but its a good practice.

and remember that if you do not kill the 1st plane before the trigger activates again after 300 seconds you will get 2,3,4,5,6,7,8 planes and so on and so forth.

Edited by Demonized

Share this post


Link to post
Share on other sites
but by your last picture you have nothing???? did you even try anything?

anywho, what you need is BIS_fnc_spawnVehicle.

I tried a few things but they were deleted after finding out they didn't work.

So Using the first reply I've come up with this:

trigger2w.th.png

Also I put a marker on the map named myplanespwn, not sure if that was needed.

edit: So I wouldnt be using the BIS_fnc_spawnGroup then in favour of using BIS_fnc_spawnVehicle

Edited by last_apoc

Share this post


Link to post
Share on other sites

MyCustomVehicle = [getMarkerPos "myplanespwn", (random 360), "fokker_d8", EAST] call bis_fnc_spawnvehicle;

will spawn the plane at the marker position with a heading of random 360, meaning in random start direction.

you should add a flyingheight, waypoints or tasks to the plane to make it stay in the area around the player or your choise, more info on this in the guide in my sig, and on the forums, maybe guard waypoint is what you need or you can search for several patrol scripts here on forum.

Edited by Demonized

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  

×