Jump to content

Search the Community

Showing results for tags 'createunit'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter
  • DayZ Italia's Lista Server
  • DayZ Italia's Forum Generale

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 9 results

  1. Hey, 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. ❤️
  2. Hi I sure help someone can shed some light - I'm making a mission where I want several random tasks to be created at random marker positions. With this I have found a way which thus far proved very effective. I created 15 markers which I placed in appropriate positions for each task. Then an officer-unit, named S1, which I placed out of the way (simulation and damage disabled) until the script is called. The working script looks like this: // SCRIPT CODE // //Place officer (s1) at random marker ("red1"-"5") and start him patrol the area. Only markers and unit placed out of the way. Once the unit (s1) has been placed, another script (USPS.sqf) then gives the unit random waypoints to patrol. After that, another script (PWNR) spawns in a support group, also patrolling the area. Task complete when s1 is killed. _taskArray = ["red_1","red_2","red_3","red_4","red_5","red_6","red_7","red_8","red_9","red_10","red_11","red_12","red_13","red_14","red_15"]; //array with marker names _taskPos = _taskArray call BIS_fnc_SelectRandom; //select a random spawn position _officer1 = s1; s1 setPosATL getMarkerPos _taskPos, 100; [player,"Task_1",["A CSAT officer is around this area","Assassinate the officer","Kill"],_officer1,True] call BIS_fnc_taskCreate; sleep 0.5; s1 hideObject false; s1 allowDamage true; s1 setCaptive false; null = [s1, 100, 200, _taskPos, _taskPos, 200, true, "SAFE", "RED", "LIMITED", "FILE", 30, 30, 0, [true,35,25,3,1]] execVM "scripts\USPS.sqf"; sleep 0.5; nul = [_taskPos,200,"EAST GUERILLA INFANTRY UNITS",8] execVM "PWNR\Scripts\PUGS.sqf"; while {alive s1} do { waitUntil {not alive s1}; ["Task_1","Succeeded"] call BIS_fnc_taskSetState; }; As I said, this works fine as long as the unit (S1) and markers is placed in the editor. My objective: I want to create the same task WITHOUT placing the unit in the editor, but rather spawning him in with <createUnit>. In this regard I have made the following script: // Task: Kill HVT _hvtArray = ["hvt_1","hvt_2","hvt_3","hvt_4","hvt_5"];//Set location array _hvtPos = _hvtArray call BIS_fnc_SelectRandom; //Select random position from array _hvtGroup = createGroup EAST; // Create HVT group _hvt = "O_Officer_F" createUnit [position _hvtPos, _hvtGroup]; // Spawn HVT [player,"Eliminate_HVT",["We have pinpointed the position of a High Value Target in the indicated area. You are to relocate and eliminate the HVT.","High Value Target","Kill"],_hvt,True] call BIS_fnc_taskCreate; while {not isNull _hvt} do { waitUntil {not alive _hvt}; ["Eliminate_HVT","Succeeded"] call BIS_fnc_taskSetState; }; //The script exits with the following error refering, I think, to line 4 : <_hvt = "O_Officer_F" createUnit [position _hvtPos, _hvtGroup]; > and neither the unit is spawned, or the task is created. "Error position, Type String, Expected object, position" I have very little scripting experience but I'm learning fast. What am I doing wrong here?
  3. Hello Dear Community! So I am using agents for my Civilian needs on a coop mission but the mission also requires that some of those civilian agents rebel and attack players. Since agents are very basic and cannot attack I must find a way to smoothly replace said agent for a REGULAR UNIT when the WITNESS´s rebel state triggers. Here is how I do stuff so far: PS: As you can probably tell by the script I am going for a "as optimized" as posible script since there will be lots of Witnesses and Enemy Units on the map as well as objects so I am tight on frames.
  4. HI All, Based on createUnit using syntax type createUnit [position, group, init, skill, rank] it states ""CARGO" - The unit will be created in cargo of the group's vehicle, regardless of the passed position. If group has no vehicle or there is no cargo space available, the unit will be placed according to "NONE"." Yet, I cannot create units inside a vehicle unless I use moveIn as below. _posLand = screenToWorld [0.5,0.5]; _veh = "O_T_LSV_02_armed_F" createVehicle [0,0,100]; _grp = createGroup EAST; _veh setVehiclePosition [_posLand, [], 0]; _grp addVehicle _veh; _unit = _grp createUnit ["O_V_Soldier_ghex_F", [0,0,0], [], 0, "CARGO"]; _unit moveInAny _veh; Is there a way to create units directly inside a vehicle with designating a position or moving them in?
  5. _casSpawn = "B_RangeMaster_F" createUnit [_casPos, _casGroup]; So i have got the range master to spawn to the group civilian, I need to be able to use setDamage but i have nothing to assign the spawned range master to, there is no variable for the spawned ai, so I need your help to set damage and get a variable so I can also use other scripts on the spawned range master. felipe.
  6. Helo.This error is driving me nuts. Any ideas why this happens? : Steam Image <-- image _guardgroup = createGroup east; _base = [getMarkerPos current_task, 400, 3000, 40, 0, 0.5, 0, ["base_marker"], getMarkerPos current_task] call BIS_fnc_findSafePos; _guard = _guardgroup createUnit ["rhs_msv_emr_officer_armored", _base, [], 2, "NONE"];
  7. Hello, I've got the following problem: I spawn some AI with a script (via createUnit) in a region on the map. Those spawned AI units don´t shoot at players if i host the mission on a server. They react to my(player) presents and switch to combat mode, run around, etc. but they won't shoot at me. Confirmed details: - Player is Blufor - AI is Opfor - AI switches to Combat Mode if player is present - AI has enough ammo - AI is capable to react (https://community.bistudio.com/wiki/enableAI) - Center is created (https://community.bistudio.com/wiki/createCenter) - Relations are correct (https://community.bistudio.com/wiki/setFriend) I´ve tested the following: - Spawn the AI in the editor -> they shoot me. - Host a local server and spawn the AI -> they shoot me. - Switch AI owner on server from server to player ({_x setOwner (owner(allPlayers select 0));} foreach allUnits;) -> they shoot me. Seems like the AI only shoot its owner on the server... Any suggestions how I can fix this? Thanks!
  8. Good morning, i wanna commit several commands in the init field of the <createUnit> command, How to do this? I get always an Error about missing brackets. Here my code: // create a new unit of same type at starting position _unitType createUnit [ _posUnit, _unitgroup, "_unit = this; this addEventHandler ["killed", {0 = [_this,_delay,_vehCall,_vehSeat,_parkPlace,_parkRad] execVM "unit_spawn.sqf"}];", _unitSkill, _unitRank]; Any idea? regards
  9. I am trying to get a function to spawn from the init box of a logic unit that is created in front of about a dozen select enemy soldiers in a base. The idea is that the logic unit has a virtual box around it that set the players captive status from true to false to simulate an AI vision cone. The issue I am having is that the way the script is written is such that once it is called it spawns this logic unit for all units assigned to a given side. This isn't ideal because the stealth segment is only one objective in the whole mission and calling the stealth script has the effect of permanently handicapping all OPFOR in the entire operation. Since I haven't been able to figure out how to get the code to delete the logic units properly and return the AI to full "intelligence" I was hoping to just assign the function to certain units. I just can't seem to figure out how to get the array to work properly. The original code is: _enemyArray = []; _i = 0; {if (side _x == east) then {_enemyArray set [_i, _x]; _i = _i + 1};} forEach allUnits; _center = createCenter sideLogic; _group = createGroup _center; player setCaptive true; for "_j" from 0 to (count _enemyArray) - 1 step 1 do { "Logic" createUnit [position (_enemyArray select _j), _group, "this AttachTo [(_enemyArray select _j), [0,25,0.5]]; _anythi = [_enemyArray select _j, this] spawn _fex_fnc_patrol;"]; sleep 0.1; }; As you can see all the units on side == east are assigned an index in the array and then all of those index's have a logic unit spawned at a specific offset which then calls the function from it's init box. I figured that simply removing lines 2 and 3, which index all units from the opfor side in the array, then change the code to this: _enemyArray = [patrol1, patrol2, patrol3, patrol4, patrol5, patrol6, sentry1, sentry2, sentry3]; _center = createCenter sideLogic; _group = createGroup _center; for "_j" from 0 to 9 do {player setCaptive true; "Logic" createUnit [position (_enemyArray select _j), _group, "this AttachTo [(_enemyArray select _j), [0,14,0.5]]; _anythi = [_enemyArray select _j, this] spawn _fex_fnc_patrol;"]; sleep 0.1; }; would work. Unfortunately what seems to happen is that either the logic unit does not spawn at all which results in the player being permanently set to captive of the code throws an error that the "Logic" createUnit command requires 3 elements and I provided 0. Im super confused, can anyone help??
×