Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

First Scenario...turning a side hostile.

 
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 Operations series >> Mods and Scenarios >> First Scenario...turning a side hostile. Page: [1]
Login
Message << Older Topic   Newer Topic >>
First Scenario...turning a side hostile. - 11/26/2019 1:08:52 PM   
incbob


Posts: 309
Joined: 6/23/2004
From: Cameron, Missouri
Status: offline
Hello.
I am working on creating my first scenario and gathering information. I am recreating the cruise of the Pakistan submarine PNS Ghazi during the 1971 India-Pakistan war.

So, the scenario starts with India and Pakistan not at war. However, if the player, as the PNS Ghazi, sinks a ship or at a specific time stamp India will turn hostile.

The manual says LUA are the way to do this. Will LUA also turn India hostile when a ship is sunk.

Also, one of India's ships is limited to 14 knots due to propulsion problems. How do I do this?

PS I know nothing of LUA

< Message edited by incbob -- 11/26/2019 1:09:47 PM >
Post #: 1
RE: First Scenario...turning a side hostile. - 11/26/2019 1:52:21 PM   
apache85

 

Posts: 2121
Joined: 12/18/2014
From: Melbourne, Australia
Status: offline
You may like to take a look at The Shark, 1971 in the Standalone Scenarios folder.

_____________________________


(in reply to incbob)
Post #: 2
RE: First Scenario...turning a side hostile. - 11/26/2019 6:41:59 PM   
incbob


Posts: 309
Joined: 6/23/2004
From: Cameron, Missouri
Status: offline
Thanks for the advice. I was thinking maybe this was the scenario that I was going to do, but this is in the west, the scenario I am doing to do is set about a week or more earlier in the east nearer Sri Lanka.

(in reply to apache85)
Post #: 3
RE: First Scenario...turning a side hostile. - 11/27/2019 3:23:53 AM   
apache85

 

Posts: 2121
Joined: 12/18/2014
From: Melbourne, Australia
Status: offline
The sides will usually treat each other as hostile once one fires on the other. However, in the case of a submarine, it may manage to be undetected when it fires in which case the 'target' side would not automatically become hostile to the 'shooter' side (since they don't know who fired on them).

To do this in the event editor, I would make an event with the following characteristics:

Triggers - Unit destroyed, unit damaged
Conditions - Nil
Actions - Lua Script

Lua:
ScenEdit_SetSidePosture('Target Side Name Here','Shooter Side Name Here','H')

As for making the Indian unit stick to a limit of 14 knots that could be handled like this:

Triggers - Regular time, 15 seconds
Conditions - Nil
Actions - Lua Script

Lua:
local speedLimitedShip = ScenEdit_GetUnit({side='Side name here', name = 'Ship name here'})
if speedLimitedShip.speed > 14 then
ScenEdit SetUnit({guid=speedLimitedShip.guid,speed=14})
end

*nb I'm travelling atm and wrote that directly into the forum without testing it, it works in theory but I may have made a typo. Let me know if you have issues.

_____________________________


(in reply to incbob)
Post #: 4
RE: First Scenario...turning a side hostile. - 11/27/2019 12:38:23 PM   
incbob


Posts: 309
Joined: 6/23/2004
From: Cameron, Missouri
Status: offline
Wow thanks.....
Right now I am gathering data and, as this is my first ever scenario, I am am figuring out what I want to do and HOW to do it.

(in reply to apache85)
Post #: 5
RE: First Scenario...turning a side hostile. - 11/27/2019 2:27:55 PM   
kevinkins


Posts: 1987
Joined: 3/8/2006
Status: offline
incbob, I found it very helpful to take a look at other designer's scenarios in the editor especially events, triggers, and actions. Many of us copy paste the lua code into a text file for later use. This can really jump start the design process.

Good luck and have fun.

Kevin

_____________________________

“The study of history lies at the foundation of all sound military conclusions and practice.”
― Alfred Thayer Mahan


(in reply to incbob)
Post #: 6
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> First Scenario...turning a side hostile. 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.125