Search the Community
Showing results for tags 'ai spawn'.
Found 5 results
-
How do i spawn AI jet fighter in air?
J.Larsson posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
is there any easy way to spawn a AI jet fighter in air and start search and destroy and when he is killed he will respawn again, same position and start over his task? ì am very bad with scripts, so I hope you people can bear with me. -
Multiplayer Dynamic AI Spawn
black_hawk_mw2_87 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone! I haven't been active for a very long time. Now I am back and I need your help. I have downloaded a ready MP/Coop Mission - Rush Redux on Tanoa by OPTiX. Since we are a small community on a private server, I need to make this mission better playable and it needs to be agains AI soldiers, so my friends and I can fight them and still finsih the main mission by completing the objectives. This is possible by destroying the MCOM's when playing on the OPFOR side because if you spawn as a BLUFOR player, the enemies will simply show up, fire upon you and your squad mates and not attack the objective. So the gameplay would be pretty boring. That's why I am going to remove the BLUFOR playable units. I have tried using THIS example with the script in the description, including my own config lines of the enemy soldiers, but it didn't work, showing me that ")" was missing on a line in the main script: { if (_Spawntarget distance _x˃_Deletedistance) then {deleteVehicle _x;}; } forEach units _EditGroup; } foreach (allGroups select {side _x == _Spawnside && (_x getVariable ["spawned",true])}); And because it didn't work I tried with A.E.S (Ambient Enemy Spawner), but the enemy soldiers spawn around me very rare and too late, and it's always laggy as hell. I have tried different options in the main module, but I wasn't satisfied with the results. Other than that, I would like to use a simple script, may be like the first one above, in order to place down custom AI units, not only Vanilla, so I can put enemies from any mod I would like to use, and I need to make a stable version without any lagg while playing. What would you recommend me to do? May be put some units around the map and automatically spawn them on me when I start playing, but the thing is that the player always starts on a different random location and can spawn in the HQ or in a vehicle. If I want to use custom enemy units I guess I will have to use a config line to get them working. Please, give me some advices, scripts or suggestions how to accomplish this task. I want the enemies to hunt down the players. Thank you in advance!- 2 replies
-
- multiplayer
- mp ai
-
(and 7 more)
Tagged with:
-
Creating Unit Layout in Editor, Spawning with Trigger Script
Gwynoak posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I tried to search the forum for something like this but can't find anything that really answers my question, this may belong in the mission scripting section but I don't know what I don't know so sorry if it does. I know how to spawn ai units using a trigger script, and even how to set their positions using waypoints and get/set POS, and how to change their alertness and guarding behavior. But Id like to add enemy AI bases that will be subject to additional scripts later on. I want to be able to place my units where I want them through the Eden editor, but set them to only spawn if a trigger and condition is met. For example, lets say we have Airbase 1 and 2. Both have encounters designed within them, but the player must clear airbase 1 before units at airbase 2 can be triggered to spawn. I'm not so worried about the condition variable, it should be simple enough to pass a Bool when airbase 1 is "captured" that airbase 2 reads, I can figure that out as I go. More importantly, I need the ability to place units in a 3 dimensional space and trigger them to spawn in those exact locations. As far as I know the marker system only works in 2D and while you can pass an elevation variable its not what I'd call accurate when dealing with buildings of different size. The ability to simply create an enemy base with AI in the editor, export it as a module or something and then give it a trigger to spawn would be best for server performance and future adaptation. My best guess: Naming AI and groups, setting some kind of object in their place like an ammo magazine, then on trigger activation replacing the appropriate magazine with the appropriate unit class? But I feel like there is a better way to do this. Very new to this, so I'm sorry if I'm missing something super basic and obvious, I've only been learning simple mission scripting up to this point and have a little bit C++, JS, python knowledge.-
- ai spawn
- eden editor
-
(and 2 more)
Tagged with:
-
Is it possible to add new groups here, which then the script always selects a new team for the area? [] spawn { if (isServer) then { waitUntil {player == player}; while {true} do { _eastunits = east countSide allUnits; playerarray = []; { playerarray = playerarray + [_x]; } forEach playableunits+switchableunits; _randomplayer = playerarray call BIS_fnc_selectRandom; _randomplayerpos = (getPos _randomplayer); if (_eastunits < 50) then { _safePosition = [ _randomplayerpos, 700, 1000, 10, 0, 20, 0] call BIS_fnc_findSafePos; _position = [_randomplayerpos, 100, 250, 10, 0, 20, 0] call BIS_fnc_findSafePos; _attackgroup = [_safePosition, EAST, [ "O_Soldier_SL_F", "O_Soldier_AR_F", "O_Soldier_GL_F", "O_soldier_M_F", "O_Soldier_AT_F", "O_Soldier_AAT_F", "O_Soldier_A_F", "O_medic_F" ]] call BIS_fnc_spawnGroup; _wp1 = _attackgroup addWaypoint [ _position, 0]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointSpeed "FULL"; _wp1 setWaypointCompletionRadius 100; _wp1 setWaypointBehaviour "aware"; _wp1 setWaypointFormation "LINE"; _wp2 = _attackgroup addWaypoint [ _safePosition,0]; _wp2 setWaypointType "CYCLE"; _wp2 setWaypointSpeed "NORMAL"; _wp2 setWaypointCompletionRadius 100; _wp2 setWaypointBehaviour "COMBAT"; _wp2 setWaypointFormation "NO CHANGE"; }; sleep 120; }; }; };
-
Hey 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.