Check postures + action? (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion



Message


Sharana -> Check postures + action? (11/24/2018 8:04:42 AM)

Hello,

I'm making a scenario where by design you are not allowed to attack before you get permission (and postures change from unfriendly to hostile). That means I need something that will end the scenario if attack is carried out before a certain time. No idea how that make that on practice, so some help will be appreciated :)
The only way I think this is possible is to make trigger that will check every XX minutes if sides turned hostile and if yes just end the scenario. If not then to nothing and wait for the next trigger to check again :D How will example like that look like?

PS: Also is there command that can deactivate a No-nav zone, I couldn't find one.




Filitch -> RE: Check postures + action? (11/24/2018 10:29:07 AM)

Could this help you, or I misunderstood you?
quote:

Create a condition for sideA being hostile to sideB

local a = ScenEdit_SetCondition({mode='add',type='SidePosture',name='sideA hostile to sideB', ObserverSideId='sidea', TargetSideId='sideb', targetposture='hostile'})
The varaiable a will contain the condition information. It will be 'nil' if the function fails in a non-interactive script as in an event.


CommandLua 98-event_handling




Sharana -> RE: Check postures + action? (11/24/2018 11:11:58 AM)

That is a condition, but it actually gave me idea how to make what I wanted to. There will be trigger running each XX minutes with condition the sides being hostile and action ending the scenario. Later when another action fires that gives permission to perform strikes and changes the postures to hostile it will first change the earlier event with LUA to no longer end the scenario.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.78125