Jump to content

Does a trigger know who was triggering him?


Recommended Posts

Posted

Hi folks!

 

Needed this a trillion times, but the ME doesn't give me this feature.

 

We have TRIGGERS, CONDITIONS, and ACTIONS.

Neither in CONDITIONS or ACTIONS I can select the unit that initially triggered this TRIGGER. Why - the hell - does the ME not host this feature? Does a trigger really don't know who triggered him?

 

Thanks for any hints on this and kind regards,

TOViper

Visit https://www.viggen.training
...Viggen... what more can you ask for?

my computer:
AMD Ryzen 5600G 4.4 GHz | NVIDIA RTX 3080 10GB | 32 GB 3.2 GHz DDR4 DUAL | SSD 980 256 GB SYS + SSD 2TB DCS | TM Warthog Stick + Throttle + TRP | Rift CV1

 

  • 5 months later...
Posted
You just found a good reason to get into scripting.

 

Hey Hardcard!

The question now is: how do you exactly solve this problem? :helpsmilie:

Visit https://www.viggen.training
...Viggen... what more can you ask for?

my computer:
AMD Ryzen 5600G 4.4 GHz | NVIDIA RTX 3080 10GB | 32 GB 3.2 GHz DDR4 DUAL | SSD 980 256 GB SYS + SSD 2TB DCS | TM Warthog Stick + Throttle + TRP | Rift CV1

 

Posted

Most events have an initiator value that returns the exact unit object that corresponds with the event.

 

When dealing with "trigger conditions" its stuff that you have to code in and iterate for many of them which is something that is invisible in terms of how the trigger works. Take for instance part of group or part of coalition in zone conditions require a list of units and the location to check against. You iterate through that list of units, check their location against the zone, and if its in the zone you know specifically which unit is in the zone to do whatever code you want.

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

Thanks Grimes for your inputs!

 

In terms of performance, what is your experience on this, e.g. when designing a mission having approx 200 units?

I mean, the iteration every second (only speaking of one single trigger) for all units. Is LUA that efficient?

Visit https://www.viggen.training
...Viggen... what more can you ask for?

my computer:
AMD Ryzen 5600G 4.4 GHz | NVIDIA RTX 3080 10GB | 32 GB 3.2 GHz DDR4 DUAL | SSD 980 256 GB SYS + SSD 2TB DCS | TM Warthog Stick + Throttle + TRP | Rift CV1

 

  • Recently Browsing   0 members

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