Jump to content

Cryptdik

Member
  • Content Count

    104
  • Joined

  • Last visited

  • Medals

Community Reputation

5 Neutral

About Cryptdik

  • Rank
    Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey guys, I'm having some trouble with a certain script. I"m using an event handler to apply a SimpleShops script to units spawned by Zeus, and while this works great in single player/Online hosted games, it does not work in a server. I tried some stuff already but decided I had to ask around to figure this out. The way it's currently working, I have this code placed in the GAME MASTER module for Zeus (like I said, this is working except in a server setting): this addEventHandler ['CuratorObjectPlaced',{ { [_x] remoteExec ["HG_fnc_aiUnitSetup", 2]; [_x] execVM "randomItem.sqf"; } forEach crew (_this select 1); }]; I tried some things like changing addEventHandler to addMPEventHandler but it still doesn't work. I feel like the solution should be simple but I can't figure it out so far.
  2. I'm not sure, I looked through some of the files that Simple Shops comes with and couldn't find it. Maybe using a script that repeats would be easier than using a trigger? Although that's a whole new bag of trouble for me to try to work out ;_;
  3. I still get the same error, this is the popup: '...)) then { _x call HG_fnc_aiUnitSetup|#|; _x setVariable ["aiSetupDone"...' Error Missing ; I got the trigger to repeat every 5 seconds and it's working with Zeus spawned units now if they're alive long enough for the trigger to repeat. However, it seems to be stacking on units so that the longer they're alive the more money they yield, so the last part is getting it only to run once on them correctly. Condition: this and var1 OnAct: {_x call HG_fnc_aiUnitSetup} forEach thislist; var1=false; hint "trigger"; On Deact: var1=tru Timer - 5 second countdown Repeatable [x] Also, I've noticed that it doesn't seem to affect vehicles from what I can tell, which would be cool but isn't a requirement, as long as players can earn money by killing enemy men I'll be satisfied. I just still can't figure out why it says it's missing a semi-colon in your solution.. Thanks a huge amount for the help btw!
  4. Hmm, I'm getting a missing ";" although I can't see for the life of me where it's missing a semi-colon.
  5. Hey, so I'm trying to make it so SimpleShops's kill rewards works on AI and players alike. It says that you call it by placing this in a unit's init box: https://github.com/Ppgtjmad/SimpleShops/wiki/Kill-Rewards [this] call HG_fnc_aiUnitSetup; I'm trying to adapt this so that I can use it with Zeus and other unit spawning scripts so that it works specifically by just running the function on every unit on the map. I was thinking of doing this by making a repeatable trigger that encompasses the entire map that should call this function on the unit that enters it once, but I can't get it to work. What I tried is making a trigger with Anybody present conditions and OnActivation does: {[this] call HG_fnc_aiUnitSetup} forEach thislist; Nothing I've tried has worked yet. I just need it to run on every unit that spawns on the map or enters a large enough trigger, any tips are appreciated! EDIT: I got it working using the following, BUT I'm getting a strange performance issue where the script must be running constantly. I might need to edit it so it only runs on a unit one time, and only when it spawns/enters the trigger. {_x call HG_fnc_aiUnitSetup} forEach thislist;
  6. I'm trying to write a basic script to create a task, spawn certain units and then set the task state to completed when said units are killed. In this case, I have the script being called from an objective board object in the mission to spawn boats (starting with just one for now) in a random part in the ocean for the player to hunt down in an A-10. It's calling the script fine because the hint is visible, but I haven't figured out the actual task creation and unit spawning part. Here's what I've got: hint "task1"; _randomPosMapNoLand = [nil, ["ground"]] call BIS_fnc_randomPos; _task1 = ["Assault Boats", {[west, ["Task1"], ["Eliminate the assault boats", "Eliminate boats", _randomPosMapNoLand], _randomPosMapNoLand, 1, 1, true] call BIS_fnc_taskCreate;}] _boat1 = [getMarkerPos "_randomPosMapNoLand", 180, "O_T_Boat_Armed_01_hmg_F", east] call BIS_fnc_spawnVehicle; waitUntil{!(alive _boat1)}; ["Task1", "SUCCEEDED",true] spawn BIS_fnc_taskSetState; Any tips on getting this working are super appreciated!
  7. I need the simplest, most effective helicopter reinforcement script available. I'm trying to make a custom support option that simply: Spawns Helo + Pilot + Reinforcements -> UNLOAD Waypoint at player's position -> MOVE waypoint back to off-map spawning marker -> Delete Helo Very frustratingly, all of the ones I've found are far too complex to use for this, so I guess I have to make my own. Here's what I have so far: _group = [[0,0,0], WEST, ["OPTRE_UNSC_ODST_Soldier_Rifleman_AR", "OPTRE_UNSC_ODST_Soldier_Rifleman_BR", "OPTRE_UNSC_ODST_Soldier_DemolitionsExpert", "OPTRE_UNSC_ODST_Soldier_Automatic_Rifleman", "OPTRE_UNSC_ODST_Soldier_Paramedic", "OPTRE_UNSC_ODST_Soldier_Rifleman_AT", "OPTRE_UNSC_ODST_Soldier_Marksman"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; units _group join (group player); _heli = "OPTRE_Pelican_unarmed" createVehicle getMarkerPos "Pspawn"; _pilot = "OPTRE_UNSC_Marine_Pilot" createVehicle getMarkerPos "PSpawn"; _pilot moveInDriver _heli; {_x moveInCargo _heli} foreach units group _group; (((THIS _GROUP DOESNT WORK HERE, WHAT DO I USE?))) wp1 = _pilot addWaypoint [getpos player,25]; wp1 setwaypointtype"UNLOAD"; wp2 = _pilot addWaypoint [getMarkerPos "PSpawn",25]; wp2 setwaypointtype"MOVE";
  8. I think I got it to work by doing this, one for each of the civs in the group. Is there a simpler way to do this yet? [civ1, "Recruit", "", "", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, {[civ1, civ2, civ3, civ4] join _caller}, {}, [], 2, nil, true, false] remoteExec ["BIS_fnc_holdActionAdd", 0, civ1]; [civ2, "Recruit", "", "", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, {[civ1, civ2, civ3, civ4] join _caller}, {}, [], 2, nil, true, false] remoteExec ["BIS_fnc_holdActionAdd", 0, civ2]; [civ3, "Recruit", "", "", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, {[civ1, civ2, civ3, civ4] join _caller}, {}, [], 2, nil, true, false] remoteExec ["BIS_fnc_holdActionAdd", 0, civ3]; [civ4, "Recruit", "", "", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, {[civ1, civ2, civ3, civ4] join _caller}, {}, [], 2, nil, true, false] remoteExec ["BIS_fnc_holdActionAdd", 0, civ4];
  9. Trying to use the BIS_fnc_holdActionAdd function in a unit's Init line so that you can approach them and recruit their group to your group, MP compatible. I've tried a number of variations based on the info here but have had no success: https://community.bistudio.com/wiki/BIS_fnc_holdActionAdd [player, "Recruit", "", "", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, {(group _target) join (group _caller)}, {}, [], 2, nil, true, false] remoteExec ["BIS_fnc_holdActionAdd", 0, _target]; The error I get is: |#|remoteExec ["BIS_fnc_holdActionAdd", 0, _target]; ERROR TYPE ANY Any help is appreciated, I'm not too fluent in scripting.
  10. So I'd like to somewhat replicate Dynamic Recon Ops or Combat Patrol missions where you have a set of waypoints on the map to choose from for your mission. I have little idea how to pull this off. Are there pre-made scripts I can use or else some guidelines to script it myself?
  11. Cryptdik

    Respawn Loadout question

    Awesome! Thanks a bunch. But when you say "export a loadout" does that mean it goes to the clipboard for copy/pasting? Or to a file somewhere?
  12. Hmm I've looked through that already, but didn't come up with those commands. Those will help a lot, but how would I disable all of the base ARMA stuff so that you can only spawn stuff from that mod? IFA3 in this case. Is there a way to perhaps disable everything for spawning and then use myCurator addCuratorAddons ["A3_Armor_F_AMV","A3_Armor_F_Panther"]; to make it so you can only use specific units/vehicles that I add to the curator addons, so if you're simply playing as one side I can dictate some infantry and vehicle units to be able to create?
  13. In the case that I'm using mods (in this case IFA3) how can I make it so that your ZEUS will only allow units from that mod? So that if I'm using IFA3 to make a ww2 mission you can only make ww2 units.
  14. So I'm wondering how to replicate the APEX campaign's respawn where you select Assault or Support or whatever. I get how to use BIS_fnc_addRespawnInventory to add loadouts but how do I create new categories instead of just "Rifleman" or whatever the basic class is, and then how do I add multiple loadouts to one class? https://community.bistudio.com/wiki/BIS_fnc_addRespawnInventory
  15. Cryptdik

    Corpse Cleanup Help

    Sorry I'm a bit slow to pick up some of the syntax shtuff. So from my understanding would I be able to put addToRemainscollector thislist; outside the last }; of the script so that it plays afterwards? Or do I put it in the part that says "SET UP STUFF HERE"? I get the group vs units array part now, but I'm still unsure how to piece this together. Where do I put addToRemainscollector thislist; so that thislist refers to the created groups? EDIT: Wait I realized that you were referring to the trigger set up. I'm going to test it now with addToRemainsCollector thislist; instead of addToRemainsCollector this;
×