Jump to content

Recommended Posts

Posted

I am trying to add some re playability to my mission. I have waypoints set up with hold points and the probabilities set but my unit always stops at wp1. I attached a picture with how I have it set up. I want him to sometimes stop at 1 and sometimes stop at 2 kind of thing. After he holds he wont move. Its just to get him in a different spot.

 

I thought I could just check the probability box and set it and be done but that didn't work.

 

I also have a question about the activate group. If a unit isnt activated is it considered dead? My objective is to kill the SAM site at bridge. If I place 4 SA15s and only one is activated and my objective trigger is set to

sam1 dead or sam2 dead or sam3 dead or sam4 dead will it trigger from start because only 3 spawned. Or would I have to set it sam1 dead and sam2 dead and sam2 dead and sam4 dead?

hold.thumb.jpg.b70812c4a3627a592cb73c64126e5a9e.jpg

Posted

To answer the second question "are units not activated alive or dead?" The answer is that they are alive. So how you set it up, it will work. I've yet to test this in DCS:WH, but in Black Shark, unactivated units still existed in the world even though they were invisible. For example put an activated unit to start on a road, and see if AI drive around the invisible unit parked on the road. Not sure if its possible to kill invisible units.

 

 

To answer the random question I suggest a different approach. But for the way you currently built it, check what the duration time is set to. If it still refuses to move make an F10 radio command to activate a triggered action of "resume".

 

The alternate approach that works just as well is to create a infinite loop trigger. For the unit in question give it a triggered action of "HOLD". Basically you will use a trigger to randomly start driving and to randomly stop driving, pretty much allowing him to be anywhere along the path.

 

Once (Start)> Time More 1 second> Flag On 1, AI Task (HOLD)

 

Switched Condition (Tick)> Time since Flag 1 is the least amount of time you want the unit to stop AND Random (2) > Flag 1 Off, Flag 2 On, Group Resume

 

Switched Condition (Tock)>Time since Flag 2 is the least amount of time you want the unit to move AND Random (2) > flag 2 off, Flag 1 On, AI Task (HOLD)

 

If you set both "time since flags" to 60 seconds and remove the random trigger the unit will drive, stop, drive at 1 minute intervals until it reaches its destination point. I would set it up so the unit stops for much longer than it drives for.

 

Notes: Random values of 1 to 10 generally have a built in delay for when it will become true. Generally speaking a value of 6-10 is at most half a minute, and 5 and below has a considerable time falloff.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
I have waypoints set up with hold points and the probabilities set but my unit always stops at wp1.

Your screenshot shows you also have the 'time' condition selected for the waypoint. When you have multiple conditions selected, any one of the conditions being true will result in success (i.e. the enabled conditions are "or"ed together).

 

So in your example, the Hold task will be performed if the time is later than 4 seconds past 4pm OR a random 10% chance. Presumably your unit always arrives at that waypoint after the given time, so it's always waiting.

 

What were you hoping to achieve with the 'time'? If you want the unit to wait indefinitely, you can just remove it and use the random probability alone. If you wanted the unit to move on after a certain time, you set that in the 'stop condition'.

Posted (edited)

If you are using mission editor random triggers, then you need to understand the trigger types.

 

"MISSION START" A "Mission Start" trigger is only ever evaluated ONCE (evaluated means that the conditions are checked), at mission start.

 

"ONCE" A "ONCE" trigger is evaluated continuously (one evaluation per second) UNTIL the conditions become true and then actions occur only ONCE. Hence the name, "ONCE". It means the ACTIONS only occur ONCE.

 

"SWITCHED" A "switched" triger is evaluated continously (one evaluation per second). When the conditions become true, and the conditions during the previous evaluation were false, THEN the action occur.

 

"CONTINUOUS" A "continuous" trigger is evaluated continuously (once per second) and if the conditions are true, then actions occur, with no restriciton on the number of times the actions can occur. This is the least used trigger type, but it is necessary sometimes.

 

So, what trigger type do you need to use with the ME's "RANDOM" condition? As you notice, ALL the trigger types except "MISSION START" are evaluated CONTINUOUSLY. So a "RANDOM" condition used with a ONCE, SWITCHED, or CONTINUOUS trigger will simply be evaluated constantly until it is true. Basically, it's like rolling a dice. Using a ONCE, SWITCHED, or CONTINUOUS trigger type with the RANDOM condition is like constantly rolling the dice. Eventually, the RANDOM condition will become true, even if it is only 1%. So you most of the time, you MUST use the MISSION START trigger type with a RANDOM condition, because only the MISSION START trigger type is like rolling the dice only one time.

 

So you need to set up your random variables at mission start, as flags. For example, for random creating four outcomes, do this:

 

MISSION START -> RANDOM(50) -> SET FLAG(101)

MISSION START -> RANDOM(50) -> SET FLAG(102)

 

ONCE(“random outcome1”)-> FLAG IS FALSE(101) AND FLAG IS FALSE(102) -> SET FLAG(1)

 

ONCE(“random outcome2”)-> FLAG IS FALSE(101) AND FLAG IS TRUE(102) -> SET FLAG(2)

 

 

ONCE(“random outcome3”)-> FLAG IS TRUE(101) AND FLAG IS FALSE(102) -> SET FLAG(3)

 

ONCE(“random outcome4”)-> FLAG IS TRUE(101) AND FLAG IS TRUE(102) -> SET FLAG(4)

 

 

Obviously, you do not need to go about setting flags 1 through 4 because you just detect the states of flags 101 and 102, but going through the trouble of individually setting a flag for each possibility helps the readability of the mission.

 

On a final note about randomness… now that we have lua available to us, randomness can be achieved much easier with lua, unless you are doing something simple.

 

As for the second part of your question, what you need to do is to set a flag when you activate a SAM. Then you have a trigger that detects the SAM as dead by either SAM dead OR Flag is False. Assuming that Flags 1 through 4 represent four unique, random possibilities, and those flags are set at the beginning of the mission, as defined above, then your triggers would look like:

 

ONCE(activate sam1) -> Flag is true (1) -> Activate group (SAM1)

 

ONCE(activate sam2) -> Flag is true (2) -> Activate group (SAM2)

 

ONCE(activate sam3) -> Flag is true (3) -> Activate group (SAM3)

 

ONCE(activate sam4) -> Flag is true (4) -> Activate group (SAM4)

 

 

ONCE(sam1 is dead) -> flag is false (1) AND Time more(10) OR Group dead (SAM1) -> Set flag (11)

 

ONCE(sam2 is dead) -> flag is false (2) AND Time more(10) OR Group dead (SAM2) -> Set flag (12)

 

ONCE(sam3 is dead) -> flag is false (3) AND Time more(10) OR Group dead (SAM3) -> Set flag (13)

 

ONCE(sam4 is dead) -> flag is false (4) AND Time more(10) OR Group dead (SAM4) -> Set flag (14)

 

ONCE(all sams dead) -> flag is true(11)AND flag is true(12)AND flag is true(13)AND flag is true(14) ->MESSAGE TO ALL(“ALL SAMS DEAD!!!11”)

 

Note the usage of the TIME MORE condition. While it appears that flags are evaluated from top to bottom in the trigger list, usage of the Time more prevents an possibility that the flags 11 through 14 could be accidentally set at mission start before one of the flags 1 through 4 is recognized to be true. If you laid your triggers out in the order presented in this post, then this wouldn't be a problem, but if they got scrambled up, they would be. It's just best to write your triggers so that they are not sensitive to the order in which they are evaluated.

Edited by Speed

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Posted

[...] make an F10 radio command to activate a triggered action of "resume".

 

You mean a trigger that can be activated by the pilot via a radio command??? Never knew this is possible. I was just about asking for such a feature (knowing it from ArmA). Is it explained in the manual??? If not could anybody give a short "How-to"?

 

TY!

[sIGPIC][/sIGPIC]

Asus ROG STRIX Z390-F Gaming, Intel Core i7 9700k , 32gb Corsair DDR4-3200

Asus RTX 2070 super, Samsung 970 EVO Plus M2, Win10 64bit, Acer XZ321QU (WQHD)

TM HOTAS Warthog, SAITEK Rudder Pedals, TIR 5

Posted
You mean a trigger that can be activated by the pilot via a radio command??? Never knew this is possible. I was just about asking for such a feature (knowing it from ArmA). Is it explained in the manual??? If not could anybody give a short "How-to"?

 

TY!

 

Yea, it's named like "RADIO OPTION" or some such. But I haven't messed around with it much, since it only works for hosts and single players.

 

For multiplayer clients, I am releasing a scripting library this weekend that will allow multiplayer clients (and hosts) to enter commands and receive text through chat messages. An early version is already used in Grimes' On Sation v5 (for the "getupdate" command), but the one I am releasing the weekend is the full version with BOTH input AND output functions :)

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Posted

Speed, this is really valuable information, very well laid out, thank you for taking the trouble. Between you and Grimes, we have a couple of real ME gurus here; med-level mission designers like me really appreciate you sharing the wisdom. Programming logic is a tough mental slog for me but needs to be learned in order to build missions with replayability through randomised functions.

Posted
You mean a trigger that can be activated by the pilot via a radio command??? Never knew this is possible. I was just about asking for such a feature (knowing it from ArmA). Is it explained in the manual??? If not could anybody give a short "How-to"?

 

TY!

 

Use the "Add radio item" trigger action. What this does is it puts a selectable option into the F10 radio menu and whenever the player uses it, it sets a flag to true. Its quite useful for debugging purposes whether its forcing AI to activate or more. I had some fun with it and figured out a decent way to create menues with sub-menues.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

@ nomdeplume

I originally only had random selected. I was trying differnt stuff to get him to move past that random hold point.

 

This is great info! Thanks for your time guys. Im sure this will help others! I will go give it a try.

Posted
Use the "Add radio item" trigger action. What this does is it puts a selectable option into the F10 radio menu and whenever the player uses it, it sets a flag to true. Its quite useful for debugging purposes whether its forcing AI to activate or more. I had some fun with it and figured out a decent way to create menues with sub-menues.

 

Wow! Thats exactly what I was looking for and didn't realize it is available! :doh:

 

I thought about (Client) CAS-Flights beeing able to call in SEAD or Fighters, or clear a certain area for ground forces / rescue units to advance to.

 

Even while I'm not a bit religious, I'm praying each day, that the next patch will hopefully fix all those "big impact" MP issues (like SPI sending / aerial refueling / trigger conditons / client crashes / ...). Else it's hard to provide your squadron a weekly training environment that is at a DCS-worth level.

 

DCS could be so much more than it is actually...

 

Especially if ED would also have had some community features included (thinking about a ME clone function for client AC for example :music_whistling: ).

 

Sorry for getting a bit OT here...

[sIGPIC][/sIGPIC]

Asus ROG STRIX Z390-F Gaming, Intel Core i7 9700k , 32gb Corsair DDR4-3200

Asus RTX 2070 super, Samsung 970 EVO Plus M2, Win10 64bit, Acer XZ321QU (WQHD)

TM HOTAS Warthog, SAITEK Rudder Pedals, TIR 5

Posted

I set this up with the random triggers like speed had posted but when someone joins I get instand CTD.

# -------------- 20110326-021609 --------------
C:\Program Files\Eagle Dynamics\DCS A-10C\bin\Transport.dll
# C0000005 ACCESS_VIOLATION at 03843A51 01:00062A51

This happens with all three of my missions I added random sams to. I set it up like this

 

First trigger

Type: Start, CONDITION: Random 50,  ACTION:  Flag 22 true

Second trigger

Type: Once, CONDITION: Flag 22 True,   ACTION: Group Activate sam1, group deactivate sam2 

Third trigger

Type: Once, CONDITION: Flag 22 False,  ACTION: Group Activate sam2, group deactivate sam1 

 

It worked when I tested by myself but once I hosted and client joined I would get above crash. I also was thinking why activate a group if they are already activated so I just put the deactivate part in and same thing happens.

Posted

Generally speaking you want to set a delayed start for the units and just activate them. That way there is no need to deactivate units.

 

On each sams starting point just add a day to whatever the mission start time is. So if its 12:00:00/3 set the day to 4 so it looks like 12:00:00/4.

 

The activate group trigger will spawn that group early, while if you just leave the mission running for 24 hours it will spawn all of the unactivated units.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...