jakkob4682
Member-
Content Count
252 -
Joined
-
Last visited
-
Medals
Everything posted by jakkob4682
-
Looking for an add-on that spawns AI in my group that I can command and stuff
jakkob4682 replied to Defiance44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Recruiting scripts rely on proximity of units to your position, and then if a unit is within distance of your position it calls a script that uses addAction. A couple of questions; 1.) are you planning on using the HC module? 2.)do you want to spawn a group or just a couple units? 3.)do you only want certain group types or units spawned if certain condition are true? -
how to get the nearestLocation of a unit no matter where he is at on the map?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
all right so I have another question then.. I have a function that auto populates an area around the town center(CityCenter) of a city when a west unit gets within certain range, basically what it does is gets the number of units and then creates _x amount of ieds in random position within a given radius, and then adds triggers to each ied position to trigger the explosions. However, I've tried using an if-loop, waitUntil{!isNull}, while loops, etc but it either only fires once or it fires indefinitely til the game crashes(stopped using the while loop because of this). So how would I use _CC = locationNull; _nCC = [_x,["CityCenter"],500]; - what kind of loop to do a continous check? and then only fire the ied function only once? -
Function to find the center of a town that a unit is in?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I can find the city center, but the script only runs once and doesn't update. I'm trying to get it to run so that if you go to another town then it'll run the script again. i.e. I have a function made that populates the area of the city center with ied's and spawns a militia squad, but that function only runs once and when I move to another town it doesn't fire again. -
Function to find the center of a town that a unit is in?
jakkob4682 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is there one out there? -
Getting Friendly Fire with spawned group
jakkob4682 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This is a script I'm working on, when I spawn the group they fire on each other, please help(no pre-placed enemy units). Also how would I go about finding the nearest city center for any west unit? thanks any help in advance ---------- Post added at 17:46 ---------- Previous post was at 17:35 ---------- halp!!! -
Getting Friendly Fire with spawned group
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
thank RYD i'll just make sure to include that in the readme for it. ---------- Post added at 18:37 ---------- Previous post was at 18:25 ---------- one more question RYD how would I get the nearestLocation of each west unit? Also, in its current version if I move to another location will it still work? i.e. spawn the group and ieds? -
Getting Friendly Fire with spawned group
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
get out of my thread.... ---------- Post added at 18:20 ---------- Previous post was at 18:19 ---------- RYD another problem, i set side to east, they're now considered hostile but they wont engage me now. -
Getting Friendly Fire with spawned group
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
omg i feel stupid, i copy and pasted the example from the wiki and editted it and forgot to change side lol, thank RYD -
Getting Friendly Fire with spawned group
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
so in other words I need to create a seperate function that adds units of a certain type and then execute from inside the code block? -
Function to find the center of a town that a unit is in?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I decided just to run it in a loop using nearestLocations, works well(assuming mission isnt loaded w/ addons and/or scripts). Just trying to work out a solution to check nearestLocations for all west units now. -
AI, Guerrilla Tactics
jakkob4682 replied to NakedSquirrel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
another way is using nearTargets and running a check every x amount of time on the threat level(to check when they engage) -
More sides and relations
jakkob4682 replied to gc8's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I am not sure but I am guessing this thread needs to go in the addon/config forums since it seems to be a configuration question. -
Function to find the center of a town that a unit is in?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
find the nearest to any blufor unit within 500 yards, then spawn some ied's with them. when the trigger activates to create the explosion I want to spawn a group nearby to ambush the blufor unit if he is in a group, or spawn an enemy sniper if there's less than x amount of friendly units nearby ---------- Post added at 04:07 ---------- Previous post was at 04:05 ---------- The reason I want to use CityCenter is because I'm trying to make it as generic as I can so its just a plugin script that doesnt require a user defined position. you said not to run it in a loop. so I would just eliminate the while-do loop and call it as a function to make it more efficient? -
Function to find the center of a town that a unit is in?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
while {true} do { _westUnits = []; { if (side _x==west) then { _westUnits = _westUnits + [_x]; _townCenter = nearestLocations [getPos _x,["CityCenter"],500]; }; }forEach _westunits; if (!isNull _townCenter) then {} }forEach allUnits; ? -
Function to find the center of a town that a unit is in?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
@Panther42 whats the command to find the name of a town?_name = getText(), but theres no citycenter in the config for any of the towns. They do how ever have an area defined in the configs for each town, so I guess that brings up a few more questions. 1. How do you get the name of the current map you're on 2. How do you get the name of a city 3. How do you get the area (I'm not very experienced reading from the configs or getting info from the configs which all 3 of those relate too) 4. Find the center of a circle with the given area -
Function question
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
so if I had a function to find the nearest town and I wanted to get the town so if I had a function to find the nearest town and I wanted to use this function in a different script _nTown = [group] call nearestTown; if (_nTown) then {}? -
If I run a function from a different script how do I get the return value from the function? Or do I make the return value global? i.e. instead of _retValue use retValue?
-
Function question
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yes, thank you -
Function to find the center of a town that a unit is in?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
how do i get the actual center of the town though? I guess the actual question is how to get the area of the town from config files dynamically -
Function to find the center of a town that a unit is in?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The first one is what I'm looking for, I could set _pos = position player and just run in it from the init.sqf right? -
Few Questions
jakkob4682 replied to Kettlewell's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
might want to ammend your original post to indicate this is a multi-player issue. -
Function question
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i get who to call the function passing variable to it... what i mean is for an example like _obj = _this select 0; retValue = False; if (argument) then { //what ever code; retValue = True; }; retValue then in another script can I just use if (retValue == True) then { do something }; -
How to use call compile format?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
/facepalm - such an easy solution thanks again cuel -
random carbomb script
jakkob4682 replied to Tonmeister's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ah gotcha, I haven't even started looking at MP scripting yet