Jump to content

SpaceHippo

Member
  • Content Count

    33
  • Joined

  • Last visited

  • Medals

Everything posted by SpaceHippo

  1. SpaceHippo

    Server Raw Command

    The CBA mod has a function that allows you to do this: https://github.com/CBATeam/CBA_A3/wiki/Registering-Custom-Chat-Commands
  2. SpaceHippo

    Waypoint lifetime checker

    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.
  3. SpaceHippo

    Select nearest from an array

    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;
  4. 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.
  5. 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
  6. 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
  7. SpaceHippo

    Adding Loot to Multiple Crates

    put a space between "round" and "(random 2)"
  8. SpaceHippo

    Adding Loot to Multiple Crates

    Try using addWeaponCargoGlobal and addItemCargoGlobal
  9. 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:
  10. 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.
  11. 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.
  12. SpaceHippo

    Spawning ai inside buildings

    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.
  13. 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.
  14. Try disableAI in an event script or in the initializing field of the unit's attributes
  15. SpaceHippo

    Who triggers a trigger?

    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.
  16. SpaceHippo

    Vehicle removal

    Wreck removal in description.ext/mission attributes doesn't remove empty vehicles, they have to be destroyed (hence the term wreck removal).
  17. 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, "", "" ];
  18. Found the edited original here and edited it again: My revised code for you to use:
  19. Have you made a mission file in the Eden Editor yet?
  20. 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.
  21. 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.
  22. 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.
  23. I saw that thread a few minutes after I posted. I should have used a code myself instead of digging through config files .
  24. SpaceHippo

    Debug Console Doing Too Many Executions

    Well that's embarrassing. Thank you though.
×