-
Content Count
359 -
Joined
-
Last visited
-
Medals
Posts posted by Lucky44
-
-
I'm stuck trying to spawn IEDs into pre-designated locations. I can get them to spawn just fine using createVehicle, but they aren't armed and can't be armed (even with a defusal kit and by an engineer).
I'd like to be able to do both ACE IEDs and vanilla IEDs. Here's what I'm trying:
"IEDurbanSmall_f" createVehicle IED1pos; //IED1pos is a position, not an object "ACE_IEDUrbanSmall_Range" createVehicle IED2pos; //IED2pos is a position, not an object
The spawning works, but the objects spawned are ID'd as things like ied_land_small.p3d, and they don't set off a mine detector. Any suggestions how I can create both of these types?
-
AWESOME!
Thanks so much.
And by the way, how did you know that? -I ask so that I can try to look it up myself and not have to ask you!
-
OK, one more question on the SpawnAI module: while everything I'm trying to do is now working right locally, on a dedicated server, no units spawn. Any ideas why that would be?
I went to https://community.bistudio.com/wiki/BIS_fnc_moduleSpawnAI, but it was useless.
Here's a demo mission that I tested on a dedicated server.
-
Wow, it was that simple. Thanks!
I was doing that wrong because I didn't realize you had meant that it should be abbreviated like that. That's kind of crazy - why would it not work to write INDEPENDENT in those places? Oh well.
Thanks for getting this all solved. I hope this thread can be useful for others too.
-
I see what you mean. I apologize for not being clearer.
Here's what I meant: when you use just the default settings for the Spawn AI module, it picks from ALL the BIS units for that side and faction. So for NATO, for instance, it can pick from 13 at least different groups, ranging from 2-man teams to 9-man squads (and that's not including Support Infantry groups, etc.). So it seemed like the group SIZE was randomized. But it's not, and I see that now. -
Sorry, I guess I put the wrong link! Here's the demo mission I made.
https://drive.google.com/open?id=1S_5ReaFMF1TtmeEEy876XunYBWJti77C
I'll take a look at your reply in a minute.
-
OK, good news and bad news.
SpawnAI "Randomizing" units within a custom group: working. -By that I mean, by adding multiple groups into the description.ext CfgGroups, I get a randomized choice from the groups listed. So, effectively, that works fine. What I meant originally (and hoped for) was just listing, say, 10 units in a custom group and having the SpawnAI module pick each one from the group randomly. That works with the default/BIS units, but not once you start using custom groups, I guess. Not a big deal. -Thanks.
Spawning at multiple locations: works fine. I didn't realize I had to add the custom Side and Faction info into those like I do for the SpawnAI module. -Thanks.
The bad news is that I can't get my custom groups to pursue the Sector Control. I see it working fine in your demo mission. I just can't get it to work with my LOP ISTS units/groups. Here's a demo mission I've made showing how the units just spawn and stand there, ignoring the Sector Control. Of course, you need the LOP ISTS mod to see those units (from Project OpFor, https://steamcommunity.com/sharedfiles/filedetails/?id=735566597).
I would guess that using any 3rd-party mod units would have the same issue.
And I am betting that there's a simple fix, but I can't figure it out!
-
You are the best, Larrow. Thanks for your help, again.
I'll take a look at this right now.
-
On 1/4/2019 at 8:04 AM, Lucky44 said:BUMP: I did notice that the AI no longer pursue the Sector Control objective that I had them using. This is a change since I switched from AAF units to a custom group of LOP ISTS units - and yes, I have them all still Independents, like the AAF were. What would cause that?
AND, now they only spawn at the main SpawnAI module location, not at the other spawnpoints connected to it.
-
OK, Great! It's working nicely!
The one thing that's curious is that it won't randomize the units at all. It always spawns the same squad, with the same number of units (although the clothing is randomized within the proper type). It's ignoring the maximum group size specified in the SpawnAI module. Is there an easy way to add some randomness to the group size?
EDIT: I did notice that the AI no longer pursue the Sector Control objective that I had them using. This is a change since I switched from AAF units to a custom group of LOP ISTS units - and yes, I have them all still Independents, like the AAF were. What would cause that?
AND, now they only spawn at the main SpawnAI module location, not at the other spawnpoints connected to it.
-
Larrow,
Thanks for your help, again! I will try this out right now and let you know how it goes.
I think you may have solved my issue just by the way you used "this" in the init box. But the additional info on using CfgGroups is even more helpful.
-
4 hours ago, Play3r said:And you did make 15 units to test from?
i have just tried your line and it works fine to me.
(Yes, I made 15 units to pull loadouts from and named them accordingly.)
How did you use it? Did you use it in SpawnAI module? If so, where did you put that line?
Thanks
-
Thanks, Play3r. I tried using that approach with the SpawnAI modules, but I couldn't get it to work. The problem was with the way the script was called from the module:
[_this] execVM "nameOfMyScript.sqf";
It threw an error on the _this part, and then the script was this:
params ["_unit"]; if !(isServer) exitWith {}; _unitToCopy = selectRandom [c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14]; _unit setUnitLoadout (getUnitLoadout _unitToCopy); lockIdentity _unit; [_unit, (speaker _unitToCopy)] remoteExec ["setSpeaker", 0, true]; [_unit, (face _unitTOCopy) ] remoteExec ["setFace", 0, true];
-I have to admit I'm not real clear on this/_this and thisList, etc. And I don't know how the params command works either. (I did set up units for the array to choose from, though. I was able to jimmy it into working via a script on a trigger, but that's not a very efficient way to do it.)
Does anyone know how to use the code right with the init box of the SpawnAI module?
-
Looking for some help with the BIS Spawn AI Module.
I can't find any documentation on how to set the faction beyond the vanilla ones (e.g., AAF, CSAT) or otherwise shape the spawns beyond the basic infantry/vehicle/armor/air options. I'd like to be able to at least set the faction, like to an RHS infantry type. Anyone know how to do this?
-
I'm back at it again, looking for help in blacklisting a few items from a virtual arsenal crate.
Some background:
- I'm using ACE3 (and some other mods like RHS)
- This will be for a multiplayer, dedicated server
- I want to have almost everything in the VA crate, but I want to remove a handful of things
I see that ACE now adds to the editor the ability to Whitelist and Blacklist individual elements. But I can't get it to work. I looked on the ACE3 site, but nothing there was helpful. Has anyone got this working? Can it be done through the editor?
Thanks in advance!
-
This is great. Thanks so much for the help.
-
Here's what I'm trying to do: script damage to specific body parts so that it will register in ACE3's medical menu. While I'm at it, I'd like to be able to govern the ACE3 Medical TYPE of damage (e.g., cut, crush, velocity, etc.).
So BIS_fnc_setHitPointDamage and setHitIndex don't work. The visuals (e.g., bloody injuries) appear on the unit, and the damage happens, but it doesn't show up on the ACE3 medical system (i.e., the need for bandaging doesn't show up).
I want to do this to create a way for medics to train (and be tested) using these scripts to apply damage to a unit in specific ways.
I think this is very feasible, but an hour of online searching yielded me nothing. Anyone have ideas?
-
Well, I had hoped to solve this 3 years ago, but I'm still stuck. Anyone have a documented way to change wind direction and speed on a dedicated server, and not have it revert back quickly?
-
OK, I tried yours, and it works fine.
Well, I'll be honest: your code is too complicated for me. I really appreciate you taking the time to help, but I can't follow the way you've done things! (I wish I could!)
But I was able to deconstruct the code and make up my own version that works:
if (!isServer) exitwith {}; private ["_pad", "_airGrp", "_Air1", "_wp1", "_wp2", "_wp3","_heli"]; //spawn the helo _airGrp= createGroup east; _Air1 = [getMarkerPos "spawnPt", 0, "O_Heli_Transport_04_covered_F", _AirGrp] call bis_fnc_spawnvehicle; //give the helo a WP where it should (move to and) land _wp1 = _airGrp addWaypoint [getPosATL pad1, 0]; _wp1 setWaypointStatements[ "true", "_heli = vehicle this; _heli land 'land';"]; _heli = (_Air1 select 0); sleep 3; //wait for it to touch the ground, plus a bit waitUntil{ isTouchingGround _heli }; doStop _heli; sleep 3; //simulate infantry getting out and moving off on their own WPs ["", ["spawnMarker7"], 10, 12, 1, "CSAT",["WP2a","WP2b","WP2z"]] execVM "spawnInfSqdNOSCALE.sqf"; sleep 15;// //make the helo takeoff, fly to a far WP and be deleted _heli doMove (getmarkerPos "WP4"); _wp4 = _airGrp addWaypoint [getMarkerPos "WP4", 0]; _wp4 setWaypointType "MOVE"; _wp4 setWaypointSpeed "FULL"; sleep 40;//wait while helo flies off out of area, then... {_heli deleteVehicleCrew _x} forEach crew _heli; deleteVehicle _heli;
The spawning of the infantry calls my own script for spawning units, obviously.
Now I want to put it into a loop to do this 6 times...
Thanks heaps for the help!
-
Ah! Sorry! I didn't see that you had linked your mission earlier! I'll look at it now.
-
By the way, I now understand the way you used the params in the BIS_fnc_spawnVehicle. Thanks for explaining it!
-
OK, I understand the problem (that I didn't include the variables in the addAction line. -Haha, the problem is that I'm not sure how to do that or which to include!
I'm guessing I need to pass the _heli, _helicrew and _heligroup, but what would that addAction look like? This?
this addAction ["Start it", "Larrow1.sqf", [_heli, _heliCrew, _heliGrp] ];
-
Hmm.
I actually don't know how to use the params with BIS_fnc_spawnVehicle. (I'm not the greatest coder!) I don't even see that explained on the https://community.bistudio.com/wiki/BIS_fnc_spawnVehicle page. Is the first argument going to name the spawned vehicle?
Anyway, I've copied and pasted your code exactly. I created a blank mission on the VR map. I put the mission here, so you can see if I'm doing something wrong/different. ( https://drive.google.com/open?id=0BxwwP5x2h_hBbFlZM2ZQMVpDczA )
-
Thanks, Larrow! I was just writing a post to request someone who has a stripped down, simple version of the concept working on a dedicated server post it when I saw your post!
I tried it, and I got an error on this line:
waitUntil{ isTouchingGround _heli };
_heli was undefined. Did I do something wrong?
Spawning in IEDs via script
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Thanks! That was helpful.
I'm now making my life more complicated. I'm trying to create a randomized mission where IEDs get spawned around town, and hostiles and civs are wandering around; players must go through and find the IEDs, deactivate them and bring them back to their base. This proved tricky because the AI kept walking over them! So I am spawning in unarmed IEDs ("IEDUrbanSmall_Remote_Ammo") and a trigger to detect when WEST players get within 5m of them. Then the trigger fires and replaces the unarmed one with an armed one ("ACE_IEDurbanSmall_Range_Ammo") . Working so far in SP...need to test on Dedicated server.