Search the Community
Showing results for tags 'bis_fnc_spawngroup'.
Found 4 results
What is the best method to spawn AI?
Gmate posted a topic in ARMA 3 - MISSION EDITING & SCRIPTINGHey, I'm new to coding and mission editing in Arma, so please go easy on me. I'm attempting to create a template of sorts to build future missions out of, I want to have a clean, easy & modular spawn system that can be easily tweaked for different scenarios, I also want to do this without mods. I am aware of 2 main ways of handling spawning AI, "createUnit" and "BIS_fnc_spawnGroup" I'm not exactly sure what is best for my specific use case, and I'm not entirely sure how to use either of them properly. Essentially what i want to do is have a trigger spawn multiple units of my choice on a marker and then have the units move towards another marker, I also want to be able to modify the behavior of these units (ex. start on limited speed.) I have tried a few different methods to achieve this, these are the issues I'm having with each: With "createUnit" the only way i have found to spawn multiple units is to repeat the code over and over, I'm sure there's a better way to do this and if so I'd love to know. Also with my current setup i have to repeat the domove code for each individual unit, I would also like to know if there is a better way to do this. Here is the code located in the triggers "On activation" field: With "BIS_fnc_spawnGroup" I'm not entirely sure how to order the units spawned within to move towards a marker, I would like to know how to do this, and I also read somewhere that the group will not be automatically deleted when all units are dead so I added a line at the end, I have no idea if it works though. Here's the code for that from the triggers activation field: I read that createUnit is better for performance when paired with the sleep command, however i have no idea how that works, and I also have my doubts, at-least with my current code repeating the same lines over and over for each unit seems very inefficient, the BIS command seems much cleaner however i don't know how to issue a move order with it which is my main problem. Additionally i would like to setup a headless client but that's a whole different topic and I don't want to draw this out any further, though if you feel like you have some useful advice on that please do share. Thanks and any advice & methods is appreciated. ❤️
Hey, I went through the search results worth of four pages that had somekind of mention about BIS_fnc_spawnGroup but couldn't find anything that would directly fit the problem I'm having. I'm trying to use [getMarkerPos "test3", side player, 10] remoteExecCall ["BIS_fnc_spawnGroup",(_this select 1),false] which spawns an AI squad (of the same side as the human player is) when a human player captures the sector. I've placed that code snippet in the Expression field of a BIS sector and while the code works nicely when testing through a editor hosted multiplayer it doesn't spawn anything when testing the mission in a dedicated server environment. What I might be missing here? Is there any way I could keep using the Expression field to execute what I want in dedicated server or should I use something else (what might that be then)? Greetings Asmodeuz
AI spawned by script not shooting
TAW_PHI posted a topic in ARMA 3 - MISSION EDITING & SCRIPTINGHey guys, I am working on a script to spawn groups of AI around a marker. I am executing the script only on the server and the AI is spawning but not shooting even though that they are reacting to the player. They have ammo and their behaviour changes to Combat. I did some testing and found out if the script is executed on the client the AI shoots on the player, but only the AI which got spawned by the player. So each AI is shooting a different player. This also overflows the objective with AI because every player spawns a new group. As far as I know the "brain" of the AI is the computer which spawned it. Is it possible that a server setting is wrong? I am also using 3 headless clients. This is my code: That's how I call the script: [[[_mainobjective],"scripts\mainobjectives\setUpBigTown.sqf"],"BIS_fnc_execVM",false] call BIS_fnc_MP; Spawning the group: _pos = [getMarkerPos (markers select _mainobjective), 0, 400, 1, 0, 1, 0] call BIS_fnc_findSafePos; _grp = [_pos, AIHQ, 5] call BIS_fnc_spawnGroup; _grp setBehaviour "SAFE"; Does anyone have an idea why the AI is not shooting? or how to fix that? Trying to fix that issue for days now and were not able to find any other post. Excuse me if I overlooked any post. Thank you guys in advance for any reply.
Spawn at height at marker?
anthonyfromtheuk posted a topic in ARMA 3 - MISSION EDITING & SCRIPTINGSimple Question how do I spawn a group at a certain height using BIS_fnc_spawnGroup at a marker? This is what I have (with the group actually defined) _group1 = [(getMarkerPos "marker1"), EAST, (configfile >> so on and so forth until we get the group)] Call BIS_fnc_spawnGroup; I would like to spawn them at 5 meters height. Thank you