Jump to content

Joyride

Members
  • Posts

    514
  • Joined

  • Last visited

About Joyride

  • Birthday November 19

Personal Information

  • Location
    Colorado, USA

Recent Profile Visitors

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

  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”?
×
×
  • Create New...