Jump to content

SpaceHippo

Member
  • Content Count

    33
  • Joined

  • Last visited

  • Medals

Community Reputation

26 Excellent

1 Follower

About SpaceHippo

  • Rank
    Private First Class

Profile Information

  • Gender
    Male
  • Location
    USA

Contact Methods

  • Biography
    Just a 17yo hippo exploring space.

Recent Profile Visitors

1187 profile views
  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
×