-
Content Count
33 -
Joined
-
Last visited
-
Medals
Everything posted by SpaceHippo
-
The CBA mod has a function that allows you to do this: https://github.com/CBATeam/CBA_A3/wiki/Registering-Custom-Chat-Commands
-
Waypoint lifetime checker
SpaceHippo replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
There is a timer option on the waypoints that lets you either specify at which time the waypoint begins or at which point it passes, I can't recall. I recommend you experiment with that. -
Select nearest from an array
SpaceHippo replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, if you read the wiki page for the function you'll notice that the array of objects can be just about anything and the origin may be as well. I suggest using the group's squad leader as the origin (give him a variable name in his editor attributes) and the using the variable names for your sectors in the array (if it is a marker, the name must be entered in the array as a string). For example: // "Sectors" are 2d triggers with global variable names 'trigger_0' through 'trigger_2' (three total) // "Origin" is group/squad leader from which to find the nearest sector named 'mySquadLeader' _nearestSector = [[trigger_0,trigger_1,trigger_2],mySquadLeader] call BIS_fnc_nearestPosition;- 1 reply
-
- 1
-
Trying to get actions in order
SpaceHippo replied to Quebec26's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You might want to consider taking advantage of the condition parameter of addAction as well BIS_fnc_holdActionAdd. For example, use setVariable to store several booleans using the laptop as the namespace. Then, in the code of each action, you may set each variable determining the condition of the actions accordingly. Like so: // PSUEDOCODE-esque // laptop_0 is a vehicle (ArmA3 Object) that already exists laptop_0 setVariable ["action1Condition",true,true]; // namespace, [name:string,value:any,public:bool] laptop_0 setVariable ["action2Condition",false,true]; laptop_0 setVariable ["holdActionCondition",false,true]; laptop_0 setVariable ["action2Condition",false,true]; action1Code = { // other code laptop_0 setVariable ["action1Condition",false,true]; // hide action 1--make condition var false laptop_0 setVariable ["action2Condition",true,true]; // show action 2 laptop_0 setVariable ["holdActionCondition",true,true]; // show hold action }; action1 = laptop_0 addAction [ // other params action1Code, ... "laptop_0 getVariable 'action1Condition' && otherConditions", // condition parameter retrieves variable ... ]; action2Code = { laptop_0 setVariable ["action2Condition",false,true]; // hide action 2 laptop_0 setVariable ["holdActionCondition",false,true]; // hide hold action laptop_0 setVariable ["action3Condition",true,true]; // show action 3 }; // and so on... I'm not so sure how well this goes over on performance or more importantly the network with the public variables, but it's the solution I like to use when doing something like you describe. -
Inventory item that gives the holder an action?
SpaceHippo replied to lolman1c's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For the grenade you could try using a fired event handler class in the cfgweapons fooMyGrenadebar_throw weapon entry I've only ever used the 'init' event handler in cfg vehicle entries but a 'fired' event handler should work to execute a script when you 'fire' the grenade weapon -
Filling out a supply box - is there a better way?
SpaceHippo replied to jo spanner's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try this: https://steamcommunity.com/workshop/filedetails/?id=1124993203 there’s no matching magazine function like the arsenal but I suggest you just write down what u need while in the arsenal then add it in the menu. With the names being the same (CUP and Apex makarov) write down the class names instead of display names- 1 reply
-
- ammo box
- supply box
-
(and 1 more)
Tagged with:
-
Adding Loot to Multiple Crates
SpaceHippo replied to Ethan_B73's topic in ARMA 3 - MISSION EDITING & SCRIPTING
put a space between "round" and "(random 2)" -
Adding Loot to Multiple Crates
SpaceHippo replied to Ethan_B73's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try using addWeaponCargoGlobal and addItemCargoGlobal -
Calculate intercept position for a moving object
SpaceHippo replied to johnnyboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Understandable 😆. I wrote two functions similar to what you need a while ago when I first found that pdf. See if you can use them might help some. Predict future position (3D): Calculate vectors from one point to another: -
Calculate intercept position for a moving object
SpaceHippo replied to johnnyboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I would recommend giving this paper a read and applying the concepts into SQF. The paper is about how anti-aircraft targeting systems mathematically determine the orientation of the gun in order to have the bullet intercept the path of a moving target. -
Trying to get AI UAV team to bomb a certain location
SpaceHippo replied to Clutchin''s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Which kind of UAV are you using and what type specifically? Ah Wait I see apologies 😅. The "destroy" waypoint isn't meant to be used for fire missions like you described and I'd recommend scripting something like that manually with a command like fireAtTarget. I also found this carpet bomb script which I thought you may be interested in. -
Spawning ai inside buildings
SpaceHippo replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You're gonna want to use disableAI to change behavior and buildingPos to get the positions they should be placed. Also, when spawning units it is good to use createUnit and not createVehicle. -
[SOLVED] Custom Loadouts on respawn only showing one, not all
SpaceHippo replied to Nutzgo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
lol it happens sometimes. Nice work -
[SOLVED] Custom Loadouts on respawn only showing one, not all
SpaceHippo replied to Nutzgo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In LoadoutClasses.hpp there are extra commas on the final array elements on lines 140, 400, 462, and 528. Also, in initServer.sqf, I'm not sure what the "3" in the function call parameters is there for but the only one without it is the one that works so perhaps the problem lies somewhere there. -
Prevent AI from issuing order at beginning of mission and prevent vehicle interaction
SpaceHippo replied to xripx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try disableAI in an event script or in the initializing field of the unit's attributes -
Who triggers a trigger?
SpaceHippo replied to corralesid's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Filter thisList so you have an array of BLUFOR and an array of Independent with forEach and side then use knowsAbout or targetKnowledge to compare their information and determine if they know about each other then execute according with an "if () then {};" code block.- 1 reply
-
- 1
-
Wreck removal in description.ext/mission attributes doesn't remove empty vehicles, they have to be destroyed (hence the term wreck removal).
-
Adding an action from an equipable item
SpaceHippo replied to Jaden Vance's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It is possible. The addAction command has a parameter that only shows the action when the code in the parameter is true. In your case, you would probably use the backpack command in the condition parameter. Would look something like this: player addAction [ "<title>", { params ["_target", "_caller", "_actionId", "_arguments"]; // some code... }, [], 1.5, true, true, "", "(backpack _orignalTarget) == 'some_classname'", // _target, _this, _originalTarget 50, false, "", "" ]; -
Automatic Spawning Mortor team that fires?
SpaceHippo replied to Grim5667's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Found the edited original here and edited it again: My revised code for you to use: -
Respawn On Active Player or Active spawn point.??
SpaceHippo replied to jonesy_d's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Have you made a mission file in the Eden Editor yet? -
Respawn On Active Player or Active spawn point.??
SpaceHippo replied to jonesy_d's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Players would be able to spawn on the squad leader even if there are flags. What, specifically, are these 'flags' you're referring to though because I don't seem to understand. -
Respawn On Active Player or Active spawn point.??
SpaceHippo replied to jonesy_d's topic in ARMA 3 - MISSION EDITING & SCRIPTING
First of all, no one will or should call you stupid on these forums. Moving on though, these functions could be helpful. https://community.bistudio.com/wiki/BIS_fnc_addRespawnPosition https://community.bistudio.com/wiki/BIS_fnc_removeRespawnPosition Add spawn position: // 'respawnPos' could be a variable name of the Squadleader or the positition ( respawnPos = [0,0,0]; ). // 'west' is the name of the BLUFOR side. respawn1 = [west, respawnPos] call BIS_fnc_addRespawnPosition; Remove spawn Position: // 'respawn1' is defined in the previous code respawn1 call BIS_fnc_removeRespawnPosition; There are a few ways to execute these functions. Personally (someone correct me if I'm wrong), I would put them in a initServer.sqf file because of how small the code is. With the code in the initServer.sqf, the respawn positions are created at the beginning of the mission. If you are new to scripting you could poke around here for some cool stuff to read. It might also explain some stuff I didn't do a good job of explaining myself. -
Every time I execute a code in the debug console, the code is executed way too many times. In this example, the words "chat" was messaged 10000 times in the system chat. If anyone knows how to fix this, I would love your help.
-
About the AI placement RHS pfm-1 question, who can help me? Thanks!
SpaceHippo replied to Jun Xiao's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I saw that thread a few minutes after I posted. I should have used a code myself instead of digging through config files . -
Debug Console Doing Too Many Executions
SpaceHippo replied to SpaceHippo's topic in ARMA 3 - TROUBLESHOOTING
Well that's embarrassing. Thank you though.