Jump to content

Joyride

Members
  • Posts

    514
  • Joined

  • Last visited

Everything posted by Joyride

  1. Very impressed so far. Well done ED.
  2. Great of you to offer help to the mission making community, HAWG.
  3. Rest in peace, Blooze! Sad to hear this.
  4. I've used a respawning fuel truck + an explosion on a few minute loop to keep smoke present throughout the mission, for similar scenarios. Very effective. Can do it via triggers or scripts quite easily.
  5. Just caught this thread, thanks Blooze (and others) for the kind words. The many hours spent working on missions has more lately been spent coaching kids soccer, family time, work, etc. but hopefully I can get back to mission design soon - I've got tons of hours already invested in unfinished missions and CAS-related scripts built for the A-10 that I'd love to finish up. Not to mention going back and tidying up the older missions - thanks to those that have done some of that work for me.
  6. Thanks for the feedback, guys. Haven't done any maintenance on this .miz in a long time, but will check it out to see if I can make some fixes.
  7. Ah, but I was so close...that did it - thanks galvesky06!
  8. Trying to select an element of a table and then remove that element so it can't be selected again. Trying to do this by key and not position, as position within the table is irrelevant. So I've read that I need to set the key to "= nil", which is the same as removing it...but not working. When I run the function below repeatedly, the selected element is not removed nor does the total # reduce. Any tips? As a work-around, I suppose I could use "table.remove" but would need to know the position of a key within the table, which I don't know how to get either. :D test = {'T1', 'T2', 'T3', 'T4', 'T5'} function PickOne() local Total = #test local TestFlag = test[math.random(Total)] trigger.action.setUserFlag(TestFlag, true) trigger.action.outText('Selected = ' .. TestFlag .. ', ' .. Total .. ' are remaining', 5) test['' .. TestFlag .. ''] = nil end
  9. Indeed! Finally have gotten back to finishing up an idea that start a year ago. Still hard to find the time I apparently used to have, though. Sent.
  10. Many thanks Ajax. Going to get my head around this and run some tests to see what works best.
  11. Thanks guys. I might find a way to make it work that way, but will easily have 50+ if-thens in one function to cover all variations, if not more. Thus the desire for dynamic naming of the function. I also want the group variations to be automatically added if I add more to the miz (drag/drop a single function to cover all this) rather than now having multiple functions to edit when I do.
  12. Let's say eventhandler1 checks "world.event.S_EVENT_HIT" if group A (initiator) shot at group B (target). Then eventhandler2 checks "world.event.S_EVENT_HIT" if group C shot at group D. No reason that those can't run concurrently right? My desire is to simply make the number at the end of "eventhandler" dynamic based on a variable passed through the defining function. The groups defined in each event handler are defined within separate functions, thus the desire to not jam all the variables into a single event handler.
  13. The example would be where one event handler is checking to see if Group A is fired upon by client A-10s and another comes on line later to check if Group B is fired upon by client A-10s. The problem is that one event handler can't handle both, because when the first one is created the second group "Group B" is not known yet. Plus, all of the other variables used are specific and within a unique function created for that local CAS scenario. So, without posting hundreds of line of code to explain that further, the question still stands if functions can have variables within their name to make the function name dynamic. Seeing stuff on LUA sites related to "loadstring" and use if "_G". Sounds like what I want to do it possible, just don't understand the syntax. Here is an example that gets very close to what I am doing, but I don't understand the answers provided in this thread :D: http://stackoverflow.com/questions/1791234/lua-call-function-from-a-string-with-function-name
  14. piXel496: There will be too many variables to accommodate in a single event handler, I could potentially have many running at the same time checking blue-on-blue (example) for numerous group/unit combinations. I just want to be able to create a unique event handler for each of the those to run globally, but concurrently. All is generated by a single script though, thus the need to pass a variable into the name of the event handler function itself. Getting back to LUA, what I want to do is similar to how you’d pass a variable into a text string. Variable = blah trigger.action.outText(‘message is: ‘ .. variable .., 10) So that produces text message = “message is: blah” How can I similarly pass a variable into a function or table name? For example, the basic start of the event handler function creates the table: BlueDamageHandler = {} How do I make that dynamic? Using the LUA text string as a (bad) example…is something like this possible? Variable = Task01 BlueDamageHandler .. Task01 .. = {} So that when this event handler is created, it is create as “BlueDamageHandlerTask01”?
  15. Short version: how to you make a function name dynamic? Long version: I need to create an event handler within a function, but may have several of these event handlers going concurrently for different "CAS taskings". In all of the examples I've seen event handlers are global. Thus, is there a way with lua to create a dynamic variable name for the event handler? For example, the event handler checks for blue-on-blue shots and is called BlueDamageHandler. This is called within function "CAS_1" which has a variable "Task" (function CAS_1(Task). So, task #1 is running and calls BlueDamageHandler to start checking for blue-on-blue shots. Meanwhile, CAS task #2 is activated using the same overall function, and also needs to call on this BlueDamageHandler but with different units to check on, etc. So how do I make the damage handler specific to each task? What I want to do is have the damage handler be called "BlueDamageHandler_01" or something for the first task, "BlueDamageHandler02" for the second, and so on.
  16. Yeah, same with an audio file not playing in ME randomly. I did figure out that if you make the duration of transmit message longer than the actual audio file, it can cause issues with subsequent messages broadcast just after. Make is tough when scripting the playing of audio files when you don't now exactly how long the .ogg or .wav is and "pad" the time a little. Submitted a bug report.
  17. Has anyone had issues with triggered sound files randomly not playing, or randomly being truncated? I've been noticing that triggered radio transmissions (either scripted or triggered action) will generally play as intended, but about maybe every fifth/sixth message gets cut off after a few seconds or may not play altogether. You can run the mission again and get different results, so it seems somewhat random. Using very basic trigger logic to test this issue. I can post an example mission later but curious if this rings a bell with anyone who uses a lot of triggered radio calls/sounds. I noticed it to a much less degree in missions I made last year (sometimes last few seconds of a transmission would get cut off), but seems like it happens much more in current World version.
  18. I am working on something very similar, alfredo. One thing I can't figure out is how to selectively remove an item from a submenu. For instance, you wanted to replace "Turn Flag 2 Off" above with something else. Seems like the scripting function: missionCommands.removeItemForCoalition(enum coalition.side coalition, Path or nil path) should have not just a "path" but also a "string name", yes? So far everything I tried results in all the submenu's and items being deleted from F10 other menu. Has anyone successfully accomplished this??
  19. Thanks for the feedback, Tetra. Working on another mission right now and getting feedback like this helps motivate me ;-)
  20. Yes, if the custom sound files are referenced to a trigger, then the .wav or .ogg file is actually saved within the .miz file. So, people who download them will hear them. If you rename the .miz as a .zip and extract it, you'll see your original sound files are simply part of the .zip package now.
  21. Ranger, sorry I missed this a few months ago. Been back in the saddle a bit working on some new miz stuff, and yes this was reported as a bug a while back - but unfortunately no progress that I can speak of.
  22. Exocet. See if any of this helps: http://forums.eagle.ru/showthread.php?t=115706&highlight=SparkleLase
  23. Yeah, not really a "bug" just a lack of any other model (other than kneeling) for the insurgent troop. I've often used Russian infantry in lieu of insurgents when I know eyes will be on moving troops in a miz., as it does look silly with them sliding across the battlefield on a knee.
  24. Having to do an emergency rebuild of my system right now and have yet to have it up and running, but will try to do so soon.
×
×
  • Create New...