Jump to content

Recommended Posts

Posted

When you take off and land, the game sends a message to the screen... (Player) took off from (base), (Player) landed at (base)

 

Is there any way to hook in to that message and use it as a trigger?

 

Can you set up a trigger rule that can set a flag upon takeoff or landing by using the same trigger that the game already uses to display those automated messages?

 

So far, I have used the method of checking if a unit speed is < 1 and altitude is less < 10

 

It would be nice just to be able to use a script that is of the same type that the game is already using to display that message.

 

Is this already available?

 

Tks

 

Z

Posted

I do believe that there is a trigger for Once, On Event (takeoff) or something like that. But I don't know who exactly that "takeoff" trigger applies to. Will it go off anytime ANYONE- AI, host, client- takes off?

 

Anyway, good idea, I'll add takeoff, landing, and perhaps "on the ground" or "in the air" Lua functions to my list of intended future Slmod features :)

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 (edited)

Ok, I found the function call in the events.lua file

 

report(_("%s took off from %s."), player_info(id), dtranslate("missioneditor", airdrome))

 

 

So, being a newbie and all to the whole lua thing.... I guess it not as easy as just somehow copying this into an advanced waypoint... run script box and use it to set a flag????? Something to the effect of..

 

on_takeoff(id, airdrome)

set flag 1 true

 

(I know that's not actual .lua scripting... just trying to express a thought in layman's terms)

 

What I find interesting is that there is a trigger rule for "ON EJECT" and "ON CRASH", which are also listed in the events.lua file. It seems like maybe there is already some link to the events.lua occurring as far as triggers goes?

Edited by Zlin
  • Recently Browsing   0 members

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