|
Author
|
|
Topic: How to fix the Cruise Missle bug? |  |
|
Dida Warlord
Jan 2000
|
 |
posted May 19, 2000 09:57
 |
 |
 |  |
I noticed that the Cruise Missle unit is not working right. Because if you have a City/Air Base/Cruiser near enough, you could actually use your Cruise Missle to 'bombard' the enemy and than refuel the missle to be reused the next turn. In real life, a Missle could never be used more than once.(like Nukes, they blows themself up went attacking) But somehow this unit doesn't work the same way as a nuke does. So any idea about fixing it? |
TheBirdMan Prince Denmark Sep 1999
|
 |
posted May 22, 2000 02:13
  |
 |
 |  |
Have noticed the same (actually I'm using the little undocumented "feature" when the AIs are too aggressive).Have not tried to make any solutions on that, but what about the settings for bombard_rounds? As far as I remember, default values are 30 (20?). What if value is changed to 1? |
Dida Warlord
Jan 2000
|
 |
posted May 22, 2000 11:54
 |
 |
 |  |
what does the value 'bombard_round' does?
|
MadWoodster Warlord A wierd and mad place called Southampton Jan 2000
|
 |
posted May 22, 2000 12:41
 |
 |
 |  |
It is probably how many rounds of combat are simulated by a bombard strike. Remember of course these are one sided rounds and aren't shown, I would imagine therefore reducing it would reduce the effectiveness of a bombardment. |
Dida Warlord
Jan 2000
|
 |
posted May 22, 2000 22:36
 |
 |
 |  |
there is no way to make it works like a nuke just without pollution? |
Atahualpa King of my castle (somewhere in at) Mar 99
|
 |
posted May 23, 2000 11:26
  |
 |
 |  |
Cant be that hard to do that with Slic! After Bombard is done, kill the unit. I am no SLIC expert but simply from the logic it should be possible.However it gets more difficult when you attack normaly with a cruise missle. Or when you stack it with others and then attack. This way, cruise missles wont work anymore. *wonders whats happening when you attack with a stacked nuke* So, cruise missles may not be stacked but you can load them on subs or Missle-destroyers for example. Ata |
Dida Warlord
Jan 2000
|
 |
posted May 23, 2000 11:59
 |
 |
 |  |
I guess there are many SLIC expert here, they probably can help, is SLIC something like C++ ? |
St Swithin Activision Santa Monica, CA USA Apr 99
|
 |
posted May 23, 2000 17:03
 |
 |
 |  |
SLIC is a C-like language. In CTP, there are a lot of kludges that make it work pretty well. The CTP2 version is also a C-like language, only more so than CTP's. For example, to create a function in CTP, you would put the script into an aborted message box:messagebox 'Blah' { Abort(); Do {stuff} } In CTP2, it would look like this: void_f Blah() { Do {stuff} return; } SLIC has evolved into a much more powerful tool in CTP2. We are also trying to work out an interface that will allow non-programmer type people to create scripts for scenarios. More to come.
|
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted May 26, 2000 09:53
  |
 |
 |  |
With all due respect, St Swithin, but I don't think that's what these people wanted to know (though I very much like the info about CtP2 being a SLIC guru ). I think these people just wanted a fix to the missile bug.Well, Ata, you're absolutely right, it should be a piece of cake through SLIC! Now why didn't I think of that?  Anyway, here's the code that *should* do the trick. Mind that I'm at my university right now and can't try it out: code:
trigger 'MissileBugFix' when (special.attacked) { if (unit.1 = UnitType("UNIT_CRUISE_MISSILE")) { KillUnit(unit.1); } }
To get this to work, open the script.slc file in the correct folder (if your mod is in a scenario folder it would be [ctp_folder]\scenarios\[scen_name]\ctp_data\gamedata or if the mod overwrote your original game files it's in [ctp_folder]\ctp_data\gamedata - mind that I could be slightly wrong about the names, I'm doing this from the top of my head) and past this code into the file (just in the top of the file would suffice, any other place as well, as long as you don't mix any of the existing triggers up). Well hope that helps/works , Locutus PS Dida, you'd be surprised to see how little SLIC experts there are, even though it's IMHO not hard to learn (though I'm a programmer and hence biased). [This message has been edited by Locutus (edited May 26, 2000).] |
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted May 27, 2000 11:54
  |
 |
 |  |
Stupid me, it seems that I can't make even the simplest trigger without making at least three mistakes (of which two are plain stupid). Well, here a working and tested version:code:
TypeUnit missile;trigger 'MissileBugFix' when (special.bombarded) { if (unit.type == UnitType("UNIT_CRUISE_MISSILE")) { missile = unit; EnableTrigger('MissileBugFixTimer'); StartTimer(1, 1); } } trigger 'MissileBugFixTimer' when (timer.expired) { KillUnit(missile); DisableTrigger('MissileBugFixTimer'); }
Let me know if anyone has any problems, Locutus
|
Flyercraft Settler St-Luc , Qc , Canada Apr 2000
|
 |
posted June 01, 2000 06:20
  |
 |
 |  |
Hi, I copied and pasted your lines in my script.slc file at the very end but it doesn't work, my cruise missiles can still bombard and return. Right now, I don't have much time but when I get back I'll test it again while trying different stuff.Cya |
Paul King Zwolle, The Netherlands Mar 99
|
 |
posted June 01, 2000 09:08
  |
 |
 |  |
The code worked for me. I opened cheat mode to give myself a cruise missile and when I bombarded with it it got killed as planned. |
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted June 01, 2000 14:24
  |
 |
 |  |
Very strange, Flyercraft, it should work, especially since it does work for both Paul and me It'd be great if you could try again and if it still doesn't work, could you tell me some details about the situation: what mods do you use, do you use them over the standard game-files or in a scenario folder, what unit did you try to attack and under what terrain, etc.? I don't know what to look for so anything could be important. Have others tried it yet and if so, did it work?Locutus |
Paul King Zwolle, The Netherlands Mar 99
|
 |
posted June 01, 2000 15:49
  |
 |
 |  |
One thing that could cause this problem: did you start a new game after changing the slic code? As far as I know changing to the slic script only affects new games and not old saved games. |
Flyercraft Settler St-Luc , Qc , Canada Apr 2000
|
 |
posted June 01, 2000 16:59
  |
 |
 |  |
Heh, actually the problem was that I was using a saved game to conduct tests. I remembered reading something saying that the user needed to start a new game for each new mod because the saved stored info about the codes . But after being able to use new mods with old games I thought they made a mistake saying that it won't work.But now I know that it's the scripts that are saved! Anyway, thanks for helping even thought I made a wring test 
|