Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Question with triggering Event Actions

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Air / Naval Operations >> Tech Support >> Question with triggering Event Actions Page: [1]
Login
Message << Older Topic   Newer Topic >>
Question with triggering Event Actions - 5/19/2017 7:45:12 PM   
lerugray

 

Posts: 131
Joined: 12/22/2014
Status: offline
Hi everyone.

So im trying to create an event action in which the game checks to see if serbia is at war with nato, if not it penalizes the player and shows a picture of slobo smoking a cigar, but if already at war with serbia nothing happens. looks like this

if ScenEdit_GetKeyValue('serbia_at_war') ~= 'true' then

  ScenEdit_SetKeyValue('true', 'serbia_at_war')
  local current_score = ScenEdit_GetScore('NATO')
  ScenEdit_SetScore('NATO',current_score-200, 'Aggresive Action Against Serbia')
  ScenEdit_SetSidePosture('JNA/Serbia', 'NATO', 'H')
  ScenEdit_SetMission('JNA/Serbia', 'Normandy Strike', {isactive=true})
  ScenEdit_SetMission('JNA/Serbia', 'America Strike', {isactive=true})
  ScenEdit_ExecuteEventAction('Serbia Attacked!')

end
So when I run that in the console, the only thing that looks like it works is that Side NATO is now considered HOSTILE and the missions activate, the points message does not show up and the special message does not come up, any ideas? apologies if this is not the appropriate subsection for this kind of question.
Post #: 1
RE: Question with triggering Event Actions - 5/20/2017 2:46:09 AM   
michaelm


Posts: 11695
Joined: 5/5/2001
From: Sydney, Australia
Status: offline
The scoring action runs as the points do change. I don't believe you do get any message when that happens; the text shows in the scoring evaluation log for NATO.
As far as the Special Action, I can't tell but I assume that it has something wrong with it. Open up the logs folder under Command, and view the 'Lua_history...' file. It logs the commands executed, and any errors.

Best would be to attach scenario so it can be viewed in context.


_____________________________

Michael

(in reply to lerugray)
Post #: 2
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Air / Naval Operations >> Tech Support >> Question with triggering Event Actions Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.086