Posted by: VTULCobra - Thursday, December 15, 2011 8:35:32 AM
Hey guys,
How do i grant the local player a science without the command center?
This is what i have:
[code]*** IF ***
True.
*** THEN ***
Player '' is granted Science 'SCIENCE_EmergencyRepair1'.
Player '' is granted Science 'SCIENCE_RebelAmbush1'.
Player '' set Science 'SCIENCE_EmergencyRepair1' availability to Science availability 'Available'.
Player '' set Science 'SCIENCE_RebelAmbush1' availability to Science availability 'Available'.
[/code]
But it doesn't work until I apply a command center to the map, on the local players team.
How do i make the sciences available without a command center?
Thanks
Posted by: NewNightmare - Thursday, December 15, 2011 8:48:03 AM
through map.ini I think, You have to add modules to the type of CC will have for sure, or simply place a CC outside of the game border, and make it transfer to the player along with the sciences. You also would have to adjust lose conditions if selecting he 2nd option.
Posted by: VTULCobra - Thursday, December 15, 2011 8:57:05 AM
Yes, because the local player is set to lose when all factories and units belonging to local player is destroyed, but they can't destroy the command center outside of the map, so how am i supposed to exclude that command center for them to destroy in the lose conditions?
Thanks
Posted by: VTULCobra - Thursday, December 15, 2011 10:01:06 AM
I tried this instead:
First script:
[code]*** IF ***
True.
*** THEN ***
Player '' is granted Science 'SCIENCE_EmergencyRepair1'.
Player '' is granted Science 'SCIENCE_RebelAmbush1'.
Player '' set Science 'SCIENCE_EmergencyRepair1' availability to Science availability 'Available'.
Player '' set Science 'SCIENCE_RebelAmbush1' availability to Science availability 'Available'.
[/code]
Second script:
[code]*** IF ***
Player Player '' acquired Science 'SCIENCE_RebelAmbush1'.
*AND* Player Player '' acquired Science 'SCIENCE_EmergencyRepair1'.
*** THEN ***
[???] Command button: 'Command_TerrorCell' is added to all objects of type 'GLABarracks' in slot number 4 (1-12).
[???] Command button: 'Command_EmergencyRepair' is added to all objects of type 'GLAArmsDealer' in slot number 4 (1-12).
[/code]
It does work, except that when i click on the emergency repair for example, and then try to click on the ground, the cursor turns into a red cross symbol/no symbol.
And I couldn't find the "Command_RebelAmbush" in this codes drop-down box:
[code]*** IF ***
Player Player '' acquired Science 'SCIENCE_RebelAmbush1'.
*AND* Player Player '' acquired Science 'SCIENCE_EmergencyRepair1'.
*** THEN ***
[???] Command button: 'Command_TerrorCell' is added to all objects of type 'GLABarracks' in slot number 4 (1-12).
[???] Command button: 'Command_EmergencyRepair' is added to all objects of type 'GLAArmsDealer' in slot number 4 (1-12).
[/code]
So I tried "Command_TerrorCell" instead but that didn't work out, I don't even know what "Terror Cell" is, lol.
Please check the map out to see what I mean and if you can solve it, it's a .rar file.
Thanks! [ATTACH]975[/Attach]
Posted by: Annihilationzh - Thursday, December 15, 2011 10:02:39 AM
Make a script that deletes the off map CC if the player doesn't have any other CCs.
Posted by: VTULCobra - Thursday, December 15, 2011 10:05:28 AM
But if I remove the off-map CC the sciences on the right side of your screen would disappear right?
EDIT*
The emergency repair is placed in the 4th slot of the Arms Dealer and the Rebel Ambush in the 4th slot of the Barracks.
By the way, where do I find the button that places the rebel ambush, I can only find the one that says something like:
"Command_PurchaseScienceRebelAmbush1".
I Tried "Command_TerrorCell" but that didn't work...
EDIT*
Please download the map and check the scripts and the 4th slot in the Barracks and the Arms Dealer, it's hard to explain.
Thanks [ATTACH]976[/Attach]
Posted by: VTULCobra - Thursday, December 15, 2011 11:18:48 AM
Okay i fixed it, I placed an off-map CC and then made a script like this:
[code]*** IF ***
All factories belonging to Player '' have been destroyed.
*** THEN ***
Unit 'CC'is dealt a lethal amount of damage.[/code]
And then ofcourse the game over script.
Thanks for the help.
Posted by: NewNightmare - Thursday, December 15, 2011 12:09:00 PM
glad it worked ^^
Posted by: VTULCobra - Thursday, December 15, 2011 10:00:00 PM
Thanks :)
Posted by: NewNightmare - Friday, December 16, 2011 6:50:08 AM
Just a thing I've noticed, 'you've all factories gone'... what if a player has $2000000, a power plant and a dozer? game still over?
You can add [code]***if doesn't have a unit of type 'All kinds of dozers and workers here'***[/code] on top of those factories to ensure the 'fairness' ofc unless your survival OBJ is to keep some factories alive :)
Similar thing is used in Chi06 for generals in win/lose conditions script ( if no lotus and barracks, cya m8)
Posted by: VTULCobra - Friday, December 16, 2011 7:27:01 AM