Delayed Event Message After Damage/Destruction

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
DWReese
Posts: 2469
Joined: Fri Mar 21, 2014 11:40 am
Location: Miami, Florida

Delayed Event Message After Damage/Destruction

Post by DWReese »

I know how to create a message using the Event Editor to have a text Message pop up WHEN something is damaged/destroyed such as, if this building is damaged/destroyed then this message pops up.

What I would like to do is have the message pop up like 10 or 15 minutes later, so that the information doesn't appear to be instantaneously obtained.

Is there a way to delay an Event message?

Doug
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: Delayed Event Message After Damage/Destruction

Post by Rory Noonan »

Store the message as a key value, and turn the seperate event on (see below)
Use a seperate event (initially set to off) with a regular time trigger (15 mins or whichever suits) that displays the stored key value message to the player, and turns this seperate event back off.
Image
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Delayed Event Message After Damage/Destruction

Post by michaelm75au »

I would enhance the above by ...
(a) defining the key-value that holds the message (as mentioned)
(b) use the timed event that fires every x minutes, and add a condition to it to check for any value in the defined key-value. In the action, show the message and then clear the key-value. It wont fire again until there is new data to show.
This way you a very flexible 'fog of war'.
You could also set a 'time to display' key-value with it, and make the condition check that to see if the current time is after that; again gives flexibility if you want to vary time between messages.[:D]
Michael
User avatar
stilesw
Posts: 1572
Joined: Wed Jun 25, 2014 10:08 pm
Location: Hansville, WA, USA

RE: Delayed Event Message After Damage/Destruction

Post by stilesw »

apache85 & michaelm75au,

Brilliant! I was looking for a way to do something similar and this key value method will work perfectly.

Thanks much,

-Wayne
“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)
DWReese
Posts: 2469
Joined: Fri Mar 21, 2014 11:40 am
Location: Miami, Florida

RE: Delayed Event Message After Damage/Destruction

Post by DWReese »

Thanks to you (and Apache85) for the help.

Doug
Post Reply

Return to “Lua Legion”