Jump to content

deadyeti

Members
  • Posts

    12
  • Joined

  • Last visited

1 Follower

About deadyeti

  • Birthday 07/13/1991

Personal Information

  • Flight Simulators
    IL2 Sturmovic BoX
  • Location
    Canada
  • Interests
    DCS World

Recent Profile Visitors

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

  1. I am struggling to find a use case for this trigger, what do you have in mind?
  2. Would this only be useful for 'simulating' jamming effects? The use-cases seem very limited and, considering the DCS scripting engine is basically abandonware, I honestly doubt that this will ever be implemented.
  3. I just made a mission where enemy units are set to weapon hold and they are not firing. Check to make sure something is not triggering them to switch to weapons free. I can check the miz file if you provide it.
  4. Let's check the documentation: missionCommands.addCommand(string name , table/nil path , function functionToRun , any anyArgument) Let's compare this to your implementation of the addCommand function: local subN1 = missionCommands.addCommand('JTAC Activate', subR1, ctld.JTACAutoLase, { 'JTAC1', 1688 }) The problem seems to be that you are trying to pass a single table argument for "any anyArgument" rather than a string and a number. Try this: local subN1 = missionCommands.addCommand('JTAC Activate', subR1, ctld.JTACAutoLase, 'JTAC1', 1688)
  5. I assigned trigger.misc.getUserFlag() directly to a local variable and it now seems to be working as well, strange. I marked your answer as the solution although I'm still not quite sure what I did wrong, haha. But at least it's working! I'll have to do more research into what I initially did wrong later, I'm going to bed now. Thank you for your help
  6. I've tried setting the flag value both at mission start and after 10 seconds, both of which have failed. My script isn't trying to get the flag value until 20 seconds after the mission starts, so it's not trying to get the flag value before it is set. I'm out of ideas, haha. Perhaps it's just a bug.
  7. Yes, to be clear I was trying to get a number value from the flag. My apologies for not making it clear in the original post. So I want to be able to set flag exampleValue to 200 and be able to retrieve the numerical value with the trigger.misc.getUserFlag() function. I haven't tried getting boolean values, but I suspect that the function is supposed to return number values with 0 and 1 being used as true and false, respectively.
  8. Hello Everyone, I am trying to find an easy way for mission end-users to change properties in my mission script without having to interact directly with the .lua file, and I thought that a brilliant way to do this would be to have them change flag values in the mission editor and have the script pull these ME flag values using trigger.misc.getUserFlag(). Here's an example of how I've implemented it in the code: local exampleValue = trigger.misc.getUserFlag('exampleValue') The only problem is that this invariably returns 0, even if I set the flag value to the desired value (in this case, 200). I have made sure that the flag is set at mission start in the mission editor, I've made sure there are no typos in both the flag name in the ME and in the code. I checked the documentation on the hoggitworld wiki and the description of the function is "Returns the value of a user flag". After some time trying to troubleshoot, I have come to the conclusion that this function is not supposed to work with the ME flags, but instead it can only interact with flags set via its sister function trigger.action.setUserFlag(). Is this correct, or am I doing something horribly wrong? If this function isn't meant to allow you to interact with ME flags, then what purpose does it serve? What is a 'user flag'? Sorry if this seems trivial, I have relatively little experience with LUA scripting for DCS World.
  9. I am doing this as a project to learn LUA, so I've been avoiding other scripts and frameworks like MIST and MOOSE. That does look like it works exactly like mine, minus the server-side script, which is what I'm trying to avoid. I will mark this as solved as there does not seem to be a way to do what I want without server-side scripts. Thank you for the reply!
  10. I am working on a placeholders script, a script which allows me to have placeholder static planes on the airfield parking until a player chooses the slot, at which point the placeholder is deleted. This allows the airfield to feel less abandoned. The script works perfectly offline but, when the mission is being run on a dedicated server, there is enough delay between the player spawning and the placeholder being deleted that it causes the Client Unit to briefly collide with the placeholder unit which causes damage. So, I thought of two possible solutions: Somehow disable collision on the placeholder static units. Set the client units as 'Late Activation' and have the script activate the unit after a short delay. Sadly, I had no luck with the first solution. I decided to try the Late Activation workaround but since I was using "S_EVENT_BIRTH" for my script, it doesn't fire and the unit is not activated. So my question is, does entering a Late Activation unit create an event? I know it causes a message to appear to the client about the flight being delayed, but I'm not sure this is linked to an event. Any suggestions would be appreciated.
×
×
  • Create New...