Jump to content

Rawshark

Member
  • Content Count

    78
  • Joined

  • Last visited

  • Medals

Everything posted by Rawshark

  1. I get an error saying "local variable in global space"
  2. Thank you for helping a newbie out, you all are amazing!
  3. Thanks so much, can I modify it so that: if (side _unit = blufor) then so that the inventory will close if you are BLUFOR? Also for MP should i just have this in the init boxes of each player or that the same as calling it via the init.sqf
  4. Thanks for the reply. Im quite new to scripting so I am not 100% on how to adapt the code correctly, but does this look about right? If so do I call it via an init.sqf or do I have to initialise it in each player character's init box? Thanks for your time.
  5. I am pretty new to Arma scripting and while I can use the editor just fine I want to know if its possible to expand upon the respawn options via a script. In particular, I was wondering if it was possible for players to interact with a defined object (eg: UAV terminal) and have its position be set as a respawn point? Just from my basic grasp I think this might be possible with an addAction like: and inside a terminal.sqf file: (RU_WarfareBUAVterminal is an item description from the CUP mod) I haven't had a chance to tinker with this but does this sound workable or does anyone have a better suggestion as to how I can setup a respawn point via interacting with certain items. Also, would the respawn script have to change based on the faction in question? i.e- Can BLUFOR and Independent players use the same terminal to set the same waypoint? Thanks for your time
  6. I wasnt using the respawn modules, just the empty markers (respawn_west, respawn_west 1, etc..) as I can keep my respawn points hidden. Thanks so much for the code though its definitely what I was after and really cuts down the number of checkpoint triggers I needed to setup for my old system :)
  7. Heya, thanks for the reply. I tried adding the script but it didn't work, possibly due to my own incompetence. After adding the initPlayerLocal.sqf, I dropped down a laptop as a test and added the following in the object's init field: Assuming this was the correct thing to do, I could not get a scroll wheel command to come up/set as my respawn position. I am not very familiar with the remoteExec command but was I meant to create an .sqf for it? Sorry for the newbie questions by the way.
  8. Genius, thanks so much!
  9. I have created a Zeus mission where a small team of my players will need to swap from their custom combat gear to their dive suits for an underwater mission, however I can't seem to get the respawn module to work with their last equipped loadout. As it is, my units will respawn with their custom gear from the start of the mission (via the 3den Enhanced mod) however I am looking for a way to have them respawn with another custom loadout midway through the mission so that if they die during the underwater segment they will respawn at the last checkpoint with their scuba gear as opposed to their land gear. Does anyone know of a way to accomplish this for someone new to scripting?
  10. I have been testing this out on the editor and it seems that when you rearm a vehicle (eg: M2 HUMVEE) that has its ammo depleted the second time around, ACE logistics does not want to rearm the whole turret. Just to be clear, when you first re-arm an empty vehicle at the ammo truck it will rearm the whole vehicle (all 5 mags in the case of the Humvee) but if you try and rearm a second time..the ammo truck will only transfer 1-3 mags into the Humvee turret. Is this a bug or am I doing something wrong. FYI, The rearm settings module is set to Rearm Amount: entire vehicle & Ammo supply: Unlimited ammo supply.
  11. So I can get ambient sound/music to loop in a single player setting using ehID = addMusicEventHandler ["MusicStop", {playMusic "music1";}];playMusic "music1"; but I am not sure if this will work if I host a multiplayer game. Does anyone know if this is liable to break in MP or know of a sound looping script that will definitively work in MP? Finally, I would also like to end said loop once it got started via a radio command, I already know how to set the trigger up but I don't know what I have to put in the activation field to make it stop, I tried terminate my_music_handle; but that didn't work. Thanks in advance for the help.
  12. So I've placed two radio triggers for radio Alpha & Bravo and they work fine in the single and multiplayer editor but when it comes to actually playing on the multiplayer server I cannot access the radio with the scroll wheel command (0-0-1 etc..) The radio is greyed out. Anyone have an idea why this might be and what I could do to fix it? To clarify, the radio triggers are set to start playing & stop playing audio files and the condition for the triggers are 'this' and they are repeatable.
  13. Rawshark

    Looping sound in MP

    Well the way I envisioned it was that they would hear it via a radio command trigger (radio alpha) executed by me and then stopped using a similar but separate trigger (radiop Bravo). Would I need to add the playMusic "" in the activation line of Radio Bravo?
  14. Rawshark

    JSHK Contamination Area Mod

    Is there an option to change the sounds made by the detector? The current sounds work fine but I think an .ogg or .wss of a Geiger counter might just be the pièce de résistance of the mod.
  15. Rawshark

    Giving the AI more health

    Torso. I have placed "this addEventHandler ["HandleDamage", { private _out_damage = 0; if (_this select 1!="") then { _unit=_this select 0; _out_damage = 0.5; }; _out_damage }];" in the init box of my target in the hopes that I am applying half damage but it just makes the target invulnerable. I suspect what is happening is that I am resetting the damage with every hit, so while the target is getting damaged (I do see the clothing getting bloodied) I ddon'tseem to be able to drop his health to 0.
  16. First off, I know the HandleDamage event handler exists but I can't seem to get it to work in my mission where I need to create a small unit of bullet sponges. I tried adding: "[this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0; damage _unit+((_this select 2)-damage _unit)*0.5}}]" into the init box of the AI but it seems to not have any effect (at least in MP) as they just died to a single 6.5 round. I am not running ACE or anything so I cant really mess with damage coefficents that way so am looking for a script based solution for this problem. I also tried: _unit setVariable ["selections", []]; _unit setVariable ["gethit", []]; _unit addEventHandler [ "HandleDamage", { _unit = _this select 0; _selections = _unit getVariable ["selections", []]; _gethit = _unit getVariable ["gethit", []]; _selection = _this select 1; if !(_selection in _selections) then { _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection; _olddamage = _gethit select _i; _damage = _olddamage + ((_this select 2) - _olddamage) * 0.5; _gethit set [_i, _damage]; _damage; } ]; into the init box of the AI but did not get the results I am looking for. i.e- the AI taking a fair number of bullets before going down. So, if anyone has any experience in either reducing the incoming damage to AI or increasing the AI HP please let me know as I am pretty stuck.
  17. Rawshark

    Giving the AI more health

    Okay, so not being very experienced with scripts I am not entirely sure where to go from here. I passed different arrays but the results were either - target dies in one hit to the target takes 4 mags (_this select 0). I am quite clueless as to how to make sense of this EH so I don't really know what my next step would be to make a target take around 6-7 bullets to expire. Like you said it seems to work if there is a number in the EH but having experimented between 0 - 1 I can't seem to find that sweet zone of damage for the AI.
  18. Rawshark

    Giving the AI more health

    Thanks, will give it a test and see how it goes!
  19. Rawshark

    Arma 3 Crash on startup

    I was thinking that too but I don't think it would be a driver related issue. Why would the single player run fine and not the mp? Also the crash files don't flag any driver issues. :/ OP post your sys specs + DxDiag file just to complete the picture pls
  20. Rawshark

    Arma 3 Crash on startup

    Curios, what's you system specs? To confirm, your drivers are up-to-date? Did you run a Dxdiag?
  21. Rawshark

    Happy Birthday Arma

    Happy birthday, you glorious buggy bastard!
  22. So I am very new to scripting and am trying to make a basic greeting for an Arma 3 MP server. The hint.sqf file looks like this: _theGreeting = "Welcome"; Hint_theGreeting; Very basic but there is a problem when I test it in the Eden editor - I get the following error |#|Hint_theGreeting;' Error undefined variable in expression: hint_thegreeting I have no idea what I am missing here but any help would be amazing. Thanks!
  23. Rawshark

    Basic scripting issue

    Still no luck! I'm using ArmA edit and I have it written like: but I still get the same error message
×