Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

SugarBear125

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About SugarBear125

  • Rank
    Private First Class

Recent Profile Visitors

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

  1. SugarBear125

    AI Dumb bomb script

    Simpily just use the same code just change the class name
  2. SugarBear125

    Hit Eventhandler

    Still no success buddy, I changed the variable and added a second parameter and tried _killer where _instigator is and still nothing. p2 addEventHandler ["Killed", { params ["","_killer","_instigator"]; _instigator setVariable ["kp", 0, true]; instigator setVariable ["kp", _instigator getVariable ["kp",0] + 1, true]; sleep 2; if (_instigator getVariable ["kp",0] == 1) then { hint "works" };
  3. SugarBear125

    Hit Eventhandler

    I tried multiple variants of this: Yours player addEventHandler ["Killed", { params ["","","_instigator"]; _instigator setVariable ["cash", _instigator getVariable ["cash",0] + 1, true]; }]; Mine to check to see if a cash was actually added: player addEventHandler ["Killed", { params ["","","_instigator"]; _instigator setVariable ["cash", _instigator getVariable ["cash",0] + 1, true]; if (cash == 1) then {hint"works"}; }]; No hint was displayed... So I tried splitting up the syntax: p2 addEventHandler ["Killed", { params ["","","_instigator"]; _instigator setVariable ["cash", 0, true]; _instigator getVariable "cash", (cash + 1); if (cash == 1) then {hint"works"}; As a last resort I tried: player addEventHandler ["Killed", { {cash = cash + 1} remoteExec ["call", _this select 3] }]; No hints are displayed/nothing worked with no errors so I cannot verify If cash was added. No idea what to try next...
  4. SugarBear125

    Help with Items Respawning

    Hm, I should of looked at all the eventhandlers before making something much more complicated lmao.
  5. SugarBear125

    AI Dumb bomb script

    Use: while { true } do { script } //That line will constantly fire since the condition is true. You could just define a variable in your unit: //init.sqf BP = 0; //Now you can change the condition while { BP == 1 } do { script } //And just change the variable at will
  6. SugarBear125

    Hit Eventhandler

    I figured I was going to have to do that. I have over 20 players set on one map just wanted to see if it would be easier way... I do have a partial HitPart eventhandler writen out but I only know how to write up about 5 eventhandlers. I knew there was a way to set a variable to a player but I forgot the actual syntax so thanks for that buddy.
  7. SugarBear125

    AI Dumb bomb script

    You could just: 1) Get velocity and direction and the Aircraft. 2) Just spawn a bomb just beneath the jet and set the direction and velocity. If you don't know how to do that I'll type it up for you when I get the chance. /////////////////////////////////////////////////// - You could use "isKindOf" for any aircraft. - You can also use "isKindOf" for type of bomb but instead of a generic expression use a class name. - flyInHeight for bombing height - distance for distance Also just follow the parameters for the code to see which is optional. [jet, "bomb", "", 50, 1000, 200, 10, 2] call BIS_fnc_fire for example
  8. SugarBear125

    Hit Eventhandler

    Would using that also work for: player addEventHandler ["Killed", { {cash = cash + 1} remoteExec ["call", _this select 3] }]; Would using: _this select 3 turn the global variable "cash" into a local one that is only given the the Killer or a global variable assigned to the killer. This is an MP scenario so ultimately I want it to be locally but everyone have the same variable for simplicity reasons.
  9. //To my understanding you simply just want to left the strecther with the player attached. You can play an laying down animation. Attach the player to the strecther and attach the strecther to the rope . player switchMove "AinjPpneMstpSnonWrflDnon"; player attachTo [strecth,[0,0,0]]; strecth attachTo [rope, [0,0,0]];
  10. SugarBear125

    Hit Eventhandler

    Simply inside the SQF is just: playsound"hit";
  11. SugarBear125

    Help with Items Respawning

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Option 1, will keep executing since the condition is true. unless you change the condition.// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// while {true} do { if ( ("classname" in (vestItems player + uniformItems player + backpackItems player + assignedItems player))) then { sleep 15; _item = "classname" createVehicle position player; _item setPos [0,0,0]//Table position, make sure to change the Z axis to place on top of table }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Option 2, You could try to just make a simple object on a table and adding an action to it.// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //For example I will be using a map ////////////////////////////////////////////////////////////////// //Will have to do this for each different item// ///////////////////////////////////////////////////////////////// //On the item, Name It map addaction ["Pickup Map", {null = []execVM"Pickup_Map.sqf"}]; //Inside Pickup_Map.sqf deleteVehicle map; player addITem "ItemMap"; sleep 15; _item = "ItemMap" createVehicle position player; _item setPos [0,0,0]; //To place on top of table _item addAction ["Pickup Map", {null = []execVM"Pickup_Map.sqf"}]; Now there is probably a more effective way to do this, but as of now these are the only two ways I could think of doing this.
  12. Now, I'm trying to use an Hit eventhandler and have it so when you shoot a player the shooter executes the script instead of the person getting shot. I have it set up below: player addEventHandler ["Hit", {null = [] execVM"hit.sqf"}]; player addEventHandler ["Hit", {_this execVM"hit.sqf"}]; When I use that second code it was working but the player who got hit heard the sound and not the shooter. I simply just need to flip that so I used: player addEventHandler ["Hit", {(_this select 0) execVM"hit.sqf"}]; player addEventHandler ["Hit", {(_this select 1) execVM"hit.sqf"}]; I've tried all of these to no avail. Inside the sqf is just a playSound so maybe somebody can help me out because im stuck.
×