Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Any script for the 'Temporarily out of command' effect?

 
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 >> Any script for the 'Temporarily out of command' effect? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Any script for the 'Temporarily out of command' effect? - 2/1/2017 2:27:12 PM   
Dysta


Posts: 1909
Joined: 8/8/2015
Status: offline
I'm making a relatively large scenario that the player's side have lots of units available to command. But I want to add a timed trigger that the first-middle part of scenario will take away the player's control (like electric failure or hacked), and of course everything went blind. Until a portion of time passed the player will retake the command and the map will show up again.

This is for testing player's pre-planned mission management prior to the out-of-command situation. My idea was to switch player to another side when triggered, but I have no clue of scripting. Or is there any better alternative?

< Message edited by Dysta -- 2/1/2017 3:13:39 PM >


_____________________________

Post #: 1
RE: Any script for the 'Temporarily our of command' eff... - 2/1/2017 2:41:17 PM   
Primarchx


Posts: 3102
Joined: 1/20/2013
Status: offline
Lua should allow you to change unit sides. Just slide what you want to a 'blind' side and you should be good to go.

(in reply to Dysta)
Post #: 2
RE: Any script for the 'Temporarily our of command' eff... - 2/1/2017 2:47:39 PM   
kevinkins


Posts: 2257
Joined: 3/8/2006
Status: offline
ScenEdit_SetUnitSide (sidedesc) may work for you. Switch to a non human side; something like a dummy side.

Example (I think you will have to switch sides on a unit by unit basis; might be a lot of code; but its all based on the same concept.)
ScenEdit_SetUnitSide({Side='Denmark', Name="Birdsong #"..i, newside='DUMMY'})

Use a for loop to cycle through each Birdsong unit you would like to switch.

You may need to test if any unit is still alive by
if ScenEdit_GetUnit({Side='Denmark', Name="Birdsong #"..i,}) ~= nil

There may be other ways, but this comes top of mind. I can PM more code if this is the right direction.

Kevin

< Message edited by kevinkin -- 2/1/2017 2:48:26 PM >

(in reply to Dysta)
Post #: 3
RE: Any script for the 'Temporarily our of command' eff... - 2/1/2017 3:14:43 PM   
Dysta


Posts: 1909
Joined: 8/8/2015
Status: offline
Thanks kevin, working on it now.

_____________________________


(in reply to kevinkins)
Post #: 4
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Any script for the 'Temporarily out of command' effect? 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

2.156