Jump to content

*tcf*jackal

Member
  • Content Count

    116
  • Joined

  • Last visited

  • Medals

Everything posted by *tcf*jackal

  1. Hi all, im about to start testing some code to see if its possible to find the nearest fuel station to the player. Having a look through CfgLocationTypes, nothing really stands out to suggest their locations might be obtainable this way. Before I start testing, does anyone know if the fuel stations are in CfgLocationTypes and if so, what they are called? Many thanks!
  2. Hi all, Cobra4v320 has created a great "defuse the bomb" script. This reminded me of a superb COOP mission from the ArmA1 days called "The Briefcase" in which the players had to acquire a tracker device which would help guide them to the location of a suitcase nuke so that they could attempt to defuse it. This was of course, all done against the clock and was one of the best ArmA missions I'd ever played. One of the gems of this mission for me was the tracker device script, and I always felt the script could have been used in other missions too. Broadly speaking when activated through an addAction, the player would hear a beep, and the closer they got to the bearing of the nuke, the quicker the beep got. The closer they got to the nuke itself, the higher the pitch of the beep. Couple this with Cobra4v320's defuse script and a similar mission could be introduced to A3. The tracker device was itself an in-game object which had to be picked up, and would be held by one player at a time, obviously. Now, this brings some questions. 1) Does such an object tracking device (type of) script already exist in A3? 2) Does the mission, or similar, already exist in A3 and I've somehow missed it? I have a copy of the original A1 mission from the post above, but first up, im no coder, and second of all I wouldnt want to rip off someone else's code. But what i'm wondering is if anybody would be interested in perhaps helping create a shiny new A3 version of the script. I think it would compliment Cobra's script really well. Im already starting to think of some great uses and features where this could be used. Imagine how much fun could be had if the target object was an enemy player. A new cougar hunt! Thoughts and comments welcomed and encouraged!
  3. Hi Zenophon. Thank you very much for taking the time to provide some examples. They work great! I also better understand how the config properties relate to the elements in the call. I did see the reference to the DLC property in your documentation and while I did try it, I obviously still had an error in there somewhere as I couldnt get it to play ball. Thanks again for all your hard work. Your framework has become an absolute must have!
  4. Hi all, im still having real trouble using Zen_SpawnInfantry with RHS units. I tried the example code above, but it throws the error "No soldiers found for the given side, type, faction, and blacklist" Digging around in the config viewer confirms that the values in the example above are valid but don't seem to work for me. The mod is installed and working correctly because a workaround is to use Zen_CreateLoadout and build loadouts manually using RHS bits and bobs. While this works it brings its own challenges and Zen_SpawnIfantry would be the ideal solution. Here are what appear to be the key values in the config viewer of, as an example, the rhsusf_usarmy_autorifleman unit in the RHS mod. faction = "rhs_faction_usarmy_d"; side = 1; type = 0; vehicleClass = "rhs_vehclass_infantry_ocp"; Has anyone had any success using Zen_SpawnInfantry with RHS units? Any additional working examples would be greatly appreciated.
  5. Thanks for the reply biggdogg. Your example has given me something else to try. I'll report back when I suss it out.
  6. Hi guys, im really enjoying using this framework, so thanks to Zenophon for all the hard work! Im having an issue using Zen_SpawnInfantry with units from the RHS mod. Issue being that I cant get it to spawn any units and in my rpt it simply states "No soldiers found for the given side, type, faction, and blacklist". If I use this code, no problem. Easy stuff, CSAT units as expected: _patrolGroup = [_startPos, east, "infantry", [2,6], 'Men'] call Zen_SpawnInfantry; But if I try to introduce some Russian units from the RHS mod using the following, no dice: _patrolGroup = [_startPos, east, "infantry", [2,6], 'Men', 'rhs_faction_vdv'] call Zen_SpawnInfantry; I've tried various combinations and alternatives based on what I've seen in the config viewer, using vehicleClass, faction etc etc. I've also seen code examples on this very thread for spawning RHS units. But I must be missing a prerequisite piece of code as I just cant get it to spawn any RHS units. Should I perhaps be using Zen_ConfigGetVehicleClasses to get a list of units before Zen_SpawnInfantry can use them? Any pointers gratefully received.
  7. *tcf*jackal

    End Game MP Mode - Feedback

    I haven't been able to get this combination to work and it seems that at present its not possible. Although im hoping im wrong and someone more clever than me can state otherwise. The aim being that once an incapacitated player bleeds out, he/she is dead, done, out of the game, with no opportunity to respawn. With respawn set to 1 in the desc.ext, it just kills you with no chance for revival. I think for tactical coop play, having a player die after bleeding out, with no chance of respawn, would be a pretty neat scenario. Given that the incapacitated dialog has a "hold space to respawn" option, im guess its mutually exclusive at present.
  8. *tcf*jackal

    Fuel Stations

    Thanks Grumpy, very good idea. I haven't yet used the nearestobjects command, but I'll have a crack at it this weekend!
  9. *tcf*jackal

    Fuel Stations

    Thanks guys, both helpful :)
  10. *tcf*jackal

    Interactive Intel Items

    Thanks JShock, greatly appreciated!
  11. *tcf*jackal

    Interactive Intel Items

    Thanks JShock.......so like this? if (isServer) then {this setVariable ["RscAttributeDiaryRecord_texture","a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true]; [this,"RscAttributeDiaryRecord",["Bomb Schematics","format ["To disarm the bomb, cut the %1 wire",disarm]",""]] call bis_fnc_setServerVariable; this setVariable ["recipients", west, true]; [this,"init"] spawn bis_fnc_initIntelObject; }; I'll keep trying, still no joy.
  12. *tcf*jackal

    Interactive Intel Items

    I've been having a look at the intel objects and stumbled across this helpful post. Using Larrow's code for starters works nicely. Im trying to embed a value from a variable into the text in the intel entry, but I cant get the syntax correct. I can print the variable value using a "hint format" just fine, but Im struggling to get the code below correct so that it appears in the intel entry instead. Can anyone assist? Im not even sure if what im trying to do is possible. if (isServer) then { this setVariable ["RscAttributeDiaryRecord_texture","a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true]; [this,"RscAttributeDiaryRecord",["Bomb Schematics","To defuse the bomb, cut the [b][format ["%1", disarm;]][/b] wire ",""]] call bis_fnc_setServerVariable; this setVariable ["recipients", west, true]; [this,"init"] spawn bis_fnc_initIntelObject; };
  13. *tcf*jackal

    Combat Space Enhancement 0.2

    Thanks for the new version guys.
  14. Thanks for sharing guys. Its interesting to see the different approaches people have taken to get a similar result. That's the beauty of a game that allows you access "under the hood". Endless solutions to different conundrums. Your scripts look far more elegant than mine do at present, so I definitely have plenty room for improvement. Even though it took me most of the weekend to get it (them) working, it was time well spent as I've learned lots. In their current guise the scripts do exactly what I want them to do, based on mission specific requirements: - Mimic a device which emits a sound which changes in pitch and frequency based on the distance and relative bearing of the player to a specified object - access to the device limited to the pilot of a chopper, and only when he/she is sitting in the pilots seat - ability to switch the device on and off at will while in the pilots seat (via "addActions") - be able to get in and out of the chopper repeatedly, and not have the script break I'll post them here when im next at home, to get some constructive feedback. Next steps in development would be to make the script(s) more portable and versatile so that they can be used in other missions without having to hack them to bits. At the moment they don't take parameters which makes them very static. This is more down to my lack of scripting experience than anything else. But KoVValsy has provided a good example on how to implement that so I'll look at that very soon. I'd also like to try and create a version which provides access to the tracker when the player has a specific named item in his/her inventory. I don't think this will be too difficult to do. Oh, and the pitch manipulation of one sound file rather than using several files sounds much tidier. So I'll try that too! Thanks again everyone!
  15. Thanks for all the help guys, I really appreciate you taking the time to help a guy (me) who doesn't really know what he's doing! @Larrow, thanks for the detailed explanation. A huge help as its clear my understanding of a switch wasn't quite what it should be. I'll also ready up on playsound3D, so thanks again for the pointer there. I'll go give this a try, and also digest the info above.
  16. I haven't been able to figure this out having tried variations of the code below. The following runs without errors in the rpt, but the _sound variable doesn't update regardless of the direction the player turns. I added a little hint to make sure _bearing is updated as part of the loop, and it seems it is. However, I only ever get the same "Beep". To clarify, beep1, 2, 3, 4.....etc are defined in a description.ext and point to individual ogg files. This is driving me nuts. Anyone have any suggestions? They would be greatly appreciated. while {alive player} do { _bearing = [player, getpos obj] call BIS_fnc_relativeDirTo; _sound = "beep"; switch (_bearing) do { case (_bearing > 0): {_sound = "beep"}; case (_bearing > 19): {_sound = "beep1"}; case (_bearing > 39): {_sound = "beep2"}; case (_bearing > 59): {_sound = "beep3"}; case (_bearing > 79): {_sound = "beep4"}; case (_bearing > 99): {_sound = "beep5"}; case (_bearing > 119): {_sound = "beep6"}; case (_bearing > 139): {_sound = "beep7"}; case (_bearing > 159): {_sound = "beep8"}; case (_bearing > 179): {_sound = "beep9"}; case (_bearing > 199): {_sound = "beep8"}; case (_bearing > 219): {_sound = "beep7"}; case (_bearing > 239): {_sound = "beep6"}; case (_bearing > 259): {_sound = "beep5"}; case (_bearing > 279): {_sound = "beep4"}; case (_bearing > 299): {_sound = "beep3"}; case (_bearing > 319): {_sound = "beep2"}; case (_bearing > 339): {_sound = "beep1"}; }; playsound _sound; hint format["Bearing is %1", _bearing]; sleep 1; };
  17. Many thanks for the pointer Austin! I'll go and give that a shot. ---------- Post added at 01:12 PM ---------- Previous post was at 12:49 PM ---------- One step closer! As Austin suggested, correcting the "switch" did the trick. Also had to declare this as was getting undeclared variable in expression errors: _sound = "beep"; Now I have a looping beep (what an age we live in!) which doesn't yet change source. Im off to bury my head in rpt files to figure out why! Probably a logic issue.
  18. Hi all, Im looking for so much needed guidance with some code im trying to put together, bearing in mind that im no coder. Im trying to mimic a tracking device using audible beeps. So the closer the player's bearing is to the relative bearing of an object, the higher the pitch of the beep. At this point im just looking to get the bearing portion of the script running, and then I'd like to add some more code which takes the players distance into account and sets the frequency of the beeps accordingly. Im aware this has been done before, but in the interests of learning I thought I'd try a different approach. Using this code, gives us the _bearing variable, which in isolation works well. _bearing = [player, getpos obj] call BIS_fnc_relativeDirTo; So, next im trying to repeatedly test the _bearing variable in a loop. If the variable is within certain ranges, the _sound variable is then set accordingly. This is then used to actually play the desired beep. Rinse and repeat while the player is alive! Im getting nowhere fast with this having tried different syntax's. Im not even sure if the flow is correct either, so all in all im a little lost. Here's the code thus far, from start to finish. while {alive player} do { _bearing = [player, getpos obj] call BIS_fnc_relativeDirTo; switch (_sound) do { case ((_bearing >= 0) && (_bearing < 19)): {_sound = "beep"}; case ((_bearing >= 19) && (_bearing < 39)): {_sound = "beep1"}; case ((_bearing >= 39) && (_bearing < 59)): {_sound = "beep2"}; case ((_bearing >= 59) && (_bearing < 79)): {_sound = "beep3"}; case ((_bearing >= 79) && (_bearing < 99)): {_sound = "beep4"}; case ((_bearing >= 99) && (_bearing < 119)): {_sound = "beep5"}; case ((_bearing >= 119) && (_bearing < 139)): {_sound = "beep6"}; case ((_bearing >= 139) && (_bearing < 159)): {_sound = "beep7"}; case ((_bearing >= 159) && (_bearing < 179)): {_sound = "beep8"}; case ((_bearing >= 179) && (_bearing < 199)): {_sound = "beep9"}; case ((_bearing >= 199) && (_bearing < 219)): {_sound = "beep8"}; case ((_bearing >= 219) && (_bearing < 239)): {_sound = "beep7"}; case ((_bearing >= 239) && (_bearing < 259)): {_sound = "beep6"}; case ((_bearing >= 259) && (_bearing < 279)): {_sound = "beep5"}; case ((_bearing >= 279) && (_bearing < 299)): {_sound = "beep4"}; case ((_bearing >= 299) && (_bearing < 319)): {_sound = "beep3"}; case ((_bearing >= 319) && (_bearing < 339)): {_sound = "beep2"}; case ((_bearing >= 339) && (_bearing <= 360)): {_sound = "beep1"}; }; playsound _sound; sleep 0.5; };
  19. *tcf*jackal

    Helicopter DLC Not Showing

    The release is 1800 CET I believe. From Twitter
  20. *tcf*jackal

    RHS Escalation (AFRF and USAF)

    and I hope you never deviate from this mantra!
  21. *tcf*jackal

    Combat Space Enhancement 0.2

    Thanks Glowbal! Looking forward to the next release. In the meantime, there`s plenty to play with!
  22. *tcf*jackal

    Combat Space Enhancement 0.2

    That would be excellent Glowbal!
  23. *tcf*jackal

    Combat Space Enhancement 0.2

    Excellent mod guys, congrats on everything so far. Its opened up some really interesting possibilities for mission design and I`m having a blast just coming up with CSE mod specific mission objectives. On that note, is there a method to track when an object is loaded into the cargo space of a vehicle? isTouchingGround only gets us so far and I wondered if there was perhaps an event we could hook into for this purpose?
  24. Many thanks Silola! I will give this a try!
  25. Hi guys. Im looking for a little help. I want to run a script when all the units from a zone have been killed and its looks like this might be possible using the DAC_Config_Events.sqf script in conjunction with the NotAliveGroup or NotAliveUnit events. I've had a good look at the instructions but im a bit lost to be honest. Lets say we have a simple DAC call to create a no-return infantry zone like this: fun=["z1",[1,1,1,0],[1,1,3,2],[],[],[],[0,0,2,0]] spawn DAC_Zone So the above zone starts deactivated. Which is fine as I activate it later in the mission. No rocket science here so far. It has no-return enabled as defined by the fourth "0". I also have a waypoint zone associated with the above infantry zone. The zone activates, and my wee squad heads off merrily to the waypoint zone. Perfect. To try and hook into an event when this squad dies, ive added the following to the init on my DAC_Intern game logic: DAC_Single_Config = ["Behaviour","Events"] I also have a DAC_Config_Events.sqf in my mission folder. The documentation suggests I would have to place some code in the "_Events_Unit_S =" section of this file but I have no clue what im doing. Simply put, I just want to run a script when this DAC generated group dies. Has anyone had any success with this feature who could perhaps share some wisdom or show us an example? Thanks in advance!
×