Jump to content

New Right click actions in ME


Pikey

Recommended Posts

Can't believe we missed this!

 

If you right click in the Mission Editor on a scenery object, you can get the "Assign as" context menu and on pressing that it places a trigger on that location.

 

But there is a difference, you now get more information under the trigger, which includes the Object ID of the building you selected.

 

This can be used to create an event handler that tracks the death of that building.

 

Thus, you can use this to identify scenery targets in your missions, create a handler for tracking their death and now fully utilise millions of terrain objects as targets, quite quickly.

 

The previous method was a very convoluted way:

1. You created an event handler to print the death and obtain the event data.

2. You entered the mission, blew up the target building and abstracted the scenery from that.

 

OR

 

1. You used a script to do a search on the world objects in the zone and made the zone right on the object and obtained the object item that way by launching the script in the mission.

 

OR

 

you used one of my scenery tools to do it with a mark point which could print a copyable example of the object ID.

 

Now, you have a method without scripts and without launching the mission which is a massive leap in simplicity and a nod to the scripting thread request for R-click actions we asked for last year.

 

So, thanks ED developers, again, for your little core improvements! Why do you let us find them and not tell us!?

 

Anyone any ideas what the additional property sections are in the right click menu under a trigger now?

rightclick.png.1b8f5fe38f498f76492e821cab786886.png

context.png.2b64f984d3037aa7789f78076b70d264.png

  • Like 1

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Thanks a lot for pinpointing this :)

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Pikey,

 

Could you give us a concrete example of how this new feature could trigger say a message that the scenery object is destroyed?

 

Only with Moose, that's all that is near my clipboard.

 

EventHandler = EVENTHANDLER:New()
EventHandler:HandleEvent( EVENTS.Dead )
function EventHandler:OnEventDead( EventData )

if EventData.IniUnitName == 78577701 then 

MESSAGE:New("Colorado Bridge destroyed",10):ToAll()
end

end

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Only with Moose, that's all that is near my clipboard.

 

EventHandler = EVENTHANDLER:New()
EventHandler:HandleEvent( EVENTS.Dead )
function EventHandler:OnEventDead( EventData )

if EventData.IniUnitName == 78577701 then 

MESSAGE:New("Colorado Bridge destroyed",10):ToAll()
end

end

 

Okay, thanks! So scripting still required ... not a total pull-down menu GUI trigger/action yet in the M.E.

I don't need no stinkin' GPS! (except for PGMs :D) :pilotfly:

[sIGPIC][/sIGPIC]

 

Link to comment
Share on other sites

Okay, thanks! So scripting still required ... not a total pull-down menu GUI trigger/action yet in the M.E.

 

 

No there has never been something that useful provided, maybe this is the first part of an implementation.

However that script is easily editable and copyable and can be run from ME, if the idea of scripting puts you off, you hit your ceiling i'm afraid.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

  • 2 weeks later...
No there has never been something that useful provided, maybe this is the first part of an implementation.

However that script is easily editable and copyable and can be run from ME, if the idea of scripting puts you off, you hit your ceiling i'm afraid.

 

Just been playing with this myself, just about to test using the unit damaged assigned to that trigger point it creates, see if it can punch out the message and other things that way for now :thumbup:

 

Have we any idea what the other values are for btw ?? seems you can add other things like value and other bits ?

Link to comment
Share on other sites

  • 1 month later...

Vanilla DCS lua. No dependencies.

local checkid = 74023650;
local function handler (self, event)
   if event.id ~= 8 or event.initiator.id_ ~= checkid then return false end
   trigger.action.setUserFlag(1,true);
   world.removeEventHandler(self);
end
world.addEventHandler {onEvent = handler}

 

The trigger action can be whatever you want, I just used the flag for scoring and followed up with other triggers.

  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...

Step 1: right click building and assign as. 

Step 2: Create trigger condition for "map object is dead" or something like that.

Step 3: Set whatever action you want. 

 

There is something that is EXTREMELY important for anyone in the future that might find this thread and wonder why it might have stopped working. The id CANNOT be completely trusted. Each time a certain map file is updated the id used for every single object will likely change. The id will either represent an entirely different object or will simply not exist. As far as I can tell the trigger condition is not impacted by this, but a script checking if the initiator.id_ is a specific number will be. Again it depends on the map being updated. 

  • Like 1
  • Thanks 3

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

Link to comment
Share on other sites

11 ore fa, Grimes ha scritto:

Passaggio 1: fare clic con il pulsante destro del mouse su edificio e assegnare come. 

Passaggio 2: creare una condizione di attivazione per "l'oggetto della mappa è morto" o qualcosa del genere.

Passaggio 3: imposta l'azione che desideri. 

 

C'è qualcosa che è ESTREMAMENTE importante per chiunque in futuro potrebbe trovare questo thread e chiedersi perché potrebbe aver smesso di funzionare. L'id NON può  essere completamente attendibile. Ogni volta che un certo map file viene aggiornato, l'id utilizzato per ogni singolo oggetto probabilmente cambierà. L'id rappresenterà un oggetto completamente diverso o semplicemente non esisterà. Per quanto posso dire, la condizione di trigger non è influenzata da questo, ma lo sarà uno script che controlla se initiator.id_ è un numero specifico. Anche in questo caso dipende dalla mappa in fase di aggiornamento. 

Thanks for your answer, but I didn't understand point 2 of your description. As soon as I click on the "assign as" button, a trigger area referring to that building appears, but in the set rules the building appears in the list only if, for example, I enter "coalition blue in that area and select the name of the assigned building Do you have any other suggestions I can give?

 

Firma DCS.png

CPU: 12th Gen Intel(R) Core(TM) i7-12700K   3.60 GHz - DDR4 32,0 GB - MSI RTX3080ti - Win 11 64bit

Link to comment
Share on other sites

They renamed it.

 

Anyway it is in the triggers menu and the zones will show up in the list. 

map_object_is_dead.JPG

  • Like 1

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

Link to comment
Share on other sites

  • 1 year later...

For some reasons I have trouble to get this to work with some buildings. For example, the oil tanks on PG map Sirri island just burn without being destroyed. Even with GBU31 hits.

Are there any ways to get around this? Can I see map object hitpoints somewhere?

Sorry for bumping up the old thread.

Link to comment
Share on other sites

14 hours ago, Galwran said:

For some reasons I have trouble to get this to work with some buildings. For example, the oil tanks on PG map Sirri island just burn without being destroyed. Even with GBU31 hits.

Are there any ways to get around this? Can I see map object hitpoints somewhere?

Sorry for bumping up the old thread.

I was using a TACAN portable beacon hidden (hidden in map, planner, and MFD all checked) inside the map object for the dead condition, and it worked well, but I replaced it with "Assign As" after seeing this thread.

It's a good thing that this is Early Access and we've all volunteered to help test and enhance this work in progress... despite the frustrations inherent in the task with even the simplest of software... otherwise people might not understand that this incredibly complex unfinished module is unfinished. /light-hearted sarcasm

Link to comment
Share on other sites

  • Recently Browsing   0 members

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