Jump to content

reggaeman007jah

Member
  • Content Count

    152
  • Joined

  • Last visited

  • Medals

Everything posted by reggaeman007jah

  1. reggaeman007jah

    Basic Arty Script (work in progress)

    KK, serena thank you both, your responses have enabled some progress (and learning) for me. To set out what I am trying to do here.. I want to create (ultimately) a small mod that allows a player to call in a bombing / arty run. To do this, I wanted to have the player to do some in-field calculations, rather than automate this work using mapping markers, GPS etc. This was sort of inspired by an absolutely amazing book (IMHO) called, 'A Rumour of War' by Philip Caputo', covering some of the early years of the conflict. In that, there are some examples of how strikes were 'called in', over the wire. My end-goal is to have a mod that allows all of this to be done just using voice alone.. but I digress. Firstly, the player should designate a 10-digit grid point (KK, thanks for helping me understand this bit). Next, the player needs to designate the direction / azimuth of the run (here, getPos manages the spacing and direction of the run). Pretty simple, but it does force the user to calculate an accurate 10-digit grid, and accurate azimuth, which is part of the fun. If you have a series of armour on a road, these two values are quite key in order to be successful. Additional potential config: type of ordinance, time in between each strike, time to wait before initial hit, total number of ord to hit, and distance between each hit (and so from that, total distance of run from start to finish). I thought it would be an idea to post this as a potential assist to any other newbie scripter like myself. I can already see so much potential to improve this code (e.g. seeing 10 lines of basically the same script is probably quite hilarious ;) thank you serena for the steer on that), so I'm using this as a way to get better at this stuff. Next objective after tidy-up - learn how to create a GUI, and have the values from that inform the script. TLDR, I'm having fun with it. Cheers RM
  2. reggaeman007jah

    Basic Arty Script (work in progress)

    Serena ... again.. thank you!! KITD FOHS
  3. reggaeman007jah

    Question about BIS_fnc_randomNum

    Thank you again, for your help and patience :)
  4. Hi folks, I am trying to create a simple script that triggers a random array of arty ahead of the player. I am using this: So what seems to happen is that the xPos does generate a random x position, but this random value stays the same across all three HE strikes. I thought it would be reset after every 'call', but it seems to be the same for each of the three strikes. When I trigger the script again, it gives me a new random x value, but again, it remains the same across all three strikes. The yPos value doesn't seem to work at all, and always seems to be 200m away. So I tried this: Now this does give me a random x value for each of the three bombs. Does this mean that I need to re-state the _xPos variable after each 80mm HE as I have done here? Or is there a way to force a randomised value after every call, but with only using one line of code at the top of the script? If this is the way to get random values in this case, I can live with that. What I can't quite figure out is how to randomise the y value ( _yPos). I thought I was using the same method as I did for the x pos, but the _yPos always gives me only the highest value (in this case 200). I imagine this is some pretty horrible code, but unfortunately it does reflect the extent of my scripting ability/knowledge currently, so any guidance is gratefully received. Cheers RM ++ EDIT ++ I think I have sussed the -yPos issue.. it does work, the HE shells seem to appear in mid-flight, I just didn't notice from where i was standing. But my question still stands re. whether I need to re-state the BIS_fnc_randomNum after every shell. ++ Edit 2 ++ Another thing I noticed about this method - I am using ModelToWorld, which seems to always spawn the items aligned to north (the clue is in the name I guess lol). So another spin-off question is, how can I get the ordinance to spawn from the alignment of the player, instead of from the world. This video tries to illustrate what I'm on about.. (sorry for the x4 video speed)..
  5. reggaeman007jah

    Question about BIS_fnc_randomNum

    Awesome !! Thank you serena, very kind of you to help :) I shall try this out tonight/tomorrow.
  6. reggaeman007jah

    Ambient battle sounds Module

    This mod really adds a nice element to missions, and removes the 'alone' factor, which I find quite common with missions. Keep up the good work !!
  7. reggaeman007jah

    C2 -Command And Control

    Have you considered using MCC alongside C2? It is a very cool and powerful combo!!
  8. Thanks for this.. Am going to have a play around with this tonight in my daily 2-hour arma window :) KITD FOHS
  9. So hello people, again I come looking for some advice. I have been thinking for some time about how I can create some sort of hacky artillery script, allowing the player to simply initiate a spread of explosions ahead of their position using a radio trigger (and then maybe via a GUI when I get a bit braver). I know I can of course use in-game modules for artillery, but I'm trying to learn the ways of sqf so I'm interested in exploring this.. OK, so my question is: Can I generate an array of flares using the code below, and then make the flares explode (as if I was to run an IED/explosion script with the explosion linked to an object). To expand slightly, I know how to generate IED explosions, and they are always (as far as I can tell) linked to named objects (e.g. water bottle, car etc). So I was thinking, I know how to generate flares ahead of my position. Could I generate the flares, and then use those flares as objects for explosions? If this were possible, I assume I'd need to name each flare, before I could link an explosion to it, and I have no idea how to do that. I also don't know if this is even needed - maybe I can simply generate map markers ahead of me, and link the explosions to those markers..? Any advice would be greatly appreciated.. (ps, I have another thread running, linked to this subject, but this is a slightly different question). Cheers dudes Flares: *** EDIT *** So a bit more research established that a solid way to trigger an explosion is to link it to a named vehicle, like this: So my guess is something along these lines... bomb = "Bo_GBU12_LGB" createvehicle ((player) ModelToWorld [-20,050,100]); Gonna test it now.. :) *** EDIT *** So I think I have answered my own question - this works :) Probably very obvious to you experienced coders, but not me lol.. anyway, to summarise (for the benefit of anyone else not very good at coding), this allows you to generate bombs ahead of your position. I want to try to work out an array of these, to be triggered simultaneously, so if I get any mileage on that Ill post back my results. Cheers :) *** Final Edit *** OK, I am only posting this up in case it is of use to any newbie scripter, like myself :)
  10. Hello folks, I have been working on some flare scripts for my missions. Basically, I have a few different versions of a simple sqf, that spawn a number of flares around the player. These are useful to me while landing heli’s at night, or getting better visibility of buildings or terrain ahead of my unit while on the ground. Basically, I have a bunch of separate sqf flare scripts, each one used for different purposes (e.g. one provides a circle around the player, another would fire off 5 flares 100m ahead of the player, another keeps repeating flares so that there is constant illumination to counter the very short life-span of vanilla flares etc). While I can plug these variations of flare-spawns into radio triggers, I would like to try to make a better UI for these sqf’s. I am also keen to activate these variations using voice commands (which are of course just key presses, activated by voice). So, what I am thinking is that I could configure my bank of flare scripts to trigger when I hit a custom key (something random like ctrl + a + 1, ctrl + a + 2 etc). Once these have been set, I can then activate these key combos using Voice Attack, with the result that I can call off a variety of flares using voice alone. So, my question to you great and knowledgeable people – how best to do this? Should I explore the CBA keybinds route, or is there a better way? Kind regards RM
  11. reggaeman007jah

    Custom keys to activate scripts

    @wyattwic This is really helpful mate, thank you, I never would have been able to craft that with my current knowledge levels! I am going to get my head around this over the weekend, hopefully I'll have something useful to report back on.. Thanks everyone !!
  12. reggaeman007jah

    Custom keys to activate scripts

    @bad benson thank you mate. I will be honest, much of what you said there is way beyond my knowledge.. but it gives me something to focus on.. so hopefully will make more sense to me in the coming days. Thanks man KITD FOHS
  13. reggaeman007jah

    Custom keys to activate scripts

    Thanks for the steer everybody..
  14. reggaeman007jah

    Custom keys to activate scripts

    So, am I right in assuming that I would put the required code into an init.sqf script, as you'd want it triggered from the start of the mission?
  15. reggaeman007jah

    Custom keys to activate scripts

    @stuguy thank you mate .. i now have my homework for the weekend :) if I make any progress I will report back .. Nice one
  16. reggaeman007jah

    SSF Factions and Faction Overhauls

    You are doing a great service to this community, thank you! KITD FOHS
  17. Hi all, I am sorry for the simple question, I hope you can help me out with this.. I have two unitPlay helis for a mission, and I would like both helis to fire up (i.e. engineOn) when I walk near them (instead of the engines both being on from the start of the mission - as per 'engineOn true' in the init of the heli). Could someone be kind enough to suggest the line of code needed in the proximity trigger to make this happen please? Again, sorry for such a simple question.. Thank you
  18. reggaeman007jah

    [solved] engineOn by proximity to player?

    Worked like a treat mate - THANK YOU !!! :) Made my day
  19. reggaeman007jah

    [solved] engineOn by proximity to player?

    Thank you mate :) I will test this as soon as I get home tonight - cheers dude
  20. @shay_gman I know I am late to the MCC party, but I just wanted to say thank you to you for this work. It has made ARMA so much more playable, and fun. The brushes, the instant action, it is all so amazing. And the arty module... oh man when I heard the chatter... Thank You Sir!
  21. Hi folks I have two unitPlay scripts in my mission, and currently make them work separately using radio triggers. Radio Alpha for heli1, Radio Bravo for heli2 etc. Each trigger has this in the init: Radio Alpha: nul = [] execVM "heli1.sqf" Radio Bravo: nul = [] execVM "heli2.sqf" I would like to call both heli scripts using just one trigger. I tried this in the init of a trigger, but it didn't really work: nul = [] execVM "heli1.sqf"; nul = [] execVM "heli2.sqf"; ... it only triggered one of the scripts. Is there an easy way to do this? I find unitCapture / unitPlay to be a bit quirky sometimes, so though there might be a known technique here. Do I need to write in a short delay between the two? Cheers RM
  22. reggaeman007jah

    x2 unitPlay scripts from one trigger..?

    Thank you mate :) Very nice, I have a lot to learn..
  23. reggaeman007jah

    x2 unitPlay scripts from one trigger..?

    Sorry guys, one last question on this.. How would I build in a few second's delay between each script? I am trying this, but no joy: launchHelos = { execVM "heli1.sqf"; {sleep 5}; execVM "heli2.sqf"; {sleep 5}; execVM "heli3.sqf"; }; Sorry for such a noob question.. ____ Edit, so this works: launchHelos = { execVM "heli1.sqf"; [] spawn {sleep 1; execVM "heli2.sqf"}; [] spawn {sleep 2; execVM "heli3.sqf"}; }; Don't know if this is the best way, but it get me in business :)
  24. reggaeman007jah

    x2 unitPlay scripts from one trigger..?

    @gc8 thank you mate, i was wondering about embedding them somewhere else, but didnt know how to do it. I will try that later tonight mate ... thank you again :) KITD FOHS ___ Worked a treat - thank you!
×