Jump to content
Sign in to follow this  
spookygnu

Simple spawning using a trigger and the on Act field

Recommended Posts

Hi guys I have been playing around in the ediotr for a few weeks and today thought about trying some spawning of AI enemy when I enter a triggerzone. I saw lucky 44's video youtube about this. Seems his information is mixed up for me and I have everything identical. Still no joy for me. Anyway, I'm not great at SQS or SQF scripting I haven't even looked at thigns that way yet, I just wanted a simple spawn using the trigger onAct field.

My BlUFOR guys simply enter that trigger and some AI spawn in the placed marked.

cheers

Spooky

Share this post


Link to post
Share on other sites

You're probably looking for the createUnit command which can be found here : http://community.bistudio.com/wiki/createUnit .

Looking at the examples should probably get you started. If you have any questions regarding the command or if it's not what you're looking for, feel free to reply to this and ask :)

Share this post


Link to post
Share on other sites
You're probably looking for the createUnit command which can be found here : http://community.bistudio.com/wiki/createUnit .

Looking at the examples should probably get you started. If you have any questions regarding the command or if it's not what you're looking for, feel free to reply to this and ask :)

I did actually have some success with the way Lucky 44 was doing it in the video, but the only thing was I couldn't change the unit types. I wanted insurgents and got Russian troops or resistance every time I put EAST in the command.

Like I said I'm not one for scripting anything at all well and I don't even know where to load the files from yet even if I did do any scripting. I basically need someone to "baby-step" me through the process so I can understand it and make it stay in this loaf of mine.

Anyway, here is the link to his four videos.

Cheers for the response btw guys.

Spooky.

Share this post


Link to post
Share on other sites

Could you post the line you're using to spawn your unit please? I can't really look at the video right now..

Edited by FreakJoe

Share this post


Link to post
Share on other sites
Could you post the line you're using to spawn your unit please? I can't really look at the video right now..

here's the line I copied and pasted it into the editor and it worked no problem.

groupName = [getMarkerPos "spawnPoint1", EAST, 10] call BIS_fnc_spawnGroup;

I think my issues with this not working were down to me writing groupName = CreateGroup EAST; at the start of it all. Like the guy explains in his video then I took that out and it seemed to work. Thing is like I said I don't want russian units I rather have insurgents in Zargabad.

cheers

Share this post


Link to post
Share on other sites

I've found this in another thread :

_newGroup = [_pos, _side, ["RU_Soldier_SL", "RU_Soldier_TL", "RU_Soldier_AR"]] call BIS_fnc_spawnGroup;

Whereas the "_newGroup" would equal the group name (you probably know that already), "_pos" = position to spawn units at, and then the array of classnames defining what soldiers you want to spawn to be part of the group.

I hope I could help you. I've never personally used the spawnGroup function so I'm not sure.

Share this post


Link to post
Share on other sites
I've found this in another thread :

_newGroup = [_pos, _side, ["RU_Soldier_SL", "RU_Soldier_TL", "RU_Soldier_AR"]] call BIS_fnc_spawnGroup;

Whereas the "_newGroup" would equal the group name (you probably know that already), "_pos" = position to spawn units at, and then the array of classnames defining what soldiers you want to spawn to be part of the group.

I hope I could help you. I've never personally used the spawnGroup function so I'm not sure.

Thanks mate, but as mad is this sounds it's all foreign to me tbh. I have a friend who knows scripting for Arma and I'm gunna try and see if he can help me out with it that way. But like I said I'm a complete noob to programming and haven't got a scooby do. I'm really surpirsed on the lack of "basic" information there is on the wiki when it comes to scripting and coding for ARMA. I mean there isn't even a basic spawning/despawning guide there at all. Its all just lines of this lines of that, not an actual tutorial. Its like you are expected to know what the various things are already.

@JW Custom, I meant to say my web browser is screwed up and everytime I click on that link it gives me an error. Do you have any other suggestions?

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  

×