Posted by: hejsil - Wednesday, July 14, 2010 7:21:12 AM
I got a problem. i try to make a script that schould destroy a Superweapon if it have been build, but it is not going well. Here is what i got. Script Destroy superweapon. *** IF *** 'SW' has been built by Player '' *** THEN *** Unit ''is dealt a lethal amount of damage. Script superweapon list. *** IF *** True. *** THEN *** 'SW' : add 'AmericaParticleCannonUplink' 'SW' : add 'AirF_AmericaParticleCannonUplink' 'SW' : add 'Lazr_AmericaParticleCannonUplink' 'SW' : add 'SupW_AmericaParticleCannonUplink' 'SW' : add 'ChinaNuclearMissileLauncher' 'SW' : add 'Infa_ChinaNuclearMissileLauncher' 'SW' : add 'Tank_ChinaNuclearMissileLauncher' 'SW' : add 'Nuke_ChinaNuclearMissileLauncher' 'SW' : add 'GLAScudStorm' 'SW' : add 'Demo_GLAScudStorm' 'SW' : add 'Slth_GLAScudStorm' 'SW' : add 'GC_Slth_GLAScudStorm' 'SW' : add 'Chem_GLAScudStorm' 'SW' : add 'GC_Chem_GLAScudStorm' can someone plzz find out what is wrong with this. But if you cant make a script like that i got an other question.

Posted by: Annihilationzh - Wednesday, July 14, 2010 7:50:55 AM
You can't make a script like that, unless there's some method no one knows of.

Posted by: Drummin - Wednesday, July 14, 2010 9:39:48 AM
Yes, defining 'SW' as an object type is fine but that's a general classification. So the condition of the script should work. The problem is that it is not a named unit but a class of units you've defined, so is unknown. In Tiberium Wars you set a reference to an unnamed object of type "SW" and give it a name such as BYESW. Then your damage script can work for the named object BYESW. Unfortunately, Zero Hour doesn't have a script to set a reference. I guess you're stuck with just modifying the "Tech Tree" to Disallow super weapons (under Map/Modify).

Posted by: hejsil - Wednesday, July 14, 2010 9:54:00 AM
:( When i got an other quetion when i make a map.ini with a code that should make so you cant use superweapon i get a problem. It works fin in skimish, BUT when i got to multiplay with one of my friends in this map he can build superweapon but i cant, but when he try to build it the game get an error. Any of you know why that happen.

Posted by: Drummin - Wednesday, July 14, 2010 10:09:56 AM
Use the script like I mentioned in the PlyrCivilian folder instead of a map.ini file.

Posted by: hejsil - Wednesday, July 14, 2010 10:44:28 AM
I have read my own post, i whould not understand it if i was you so im trying again. I make a map.ini with this: Object ChinaNuclearMissileLauncher Buildable = No END Object Tank_ChinaNuclearMissileLauncher Buildable = No END Object Nuke_ChinaNuclearMissileLauncher Buildable = No END Object Infa_ChinaNuclearMissileLauncher Buildable = No END Object AmericaParticleCannonUplink Buildable = No END Object SupW_AmericaParticleCannonUplink Buildable = No END Object Lazr_AmericaParticleCannonUplink Buildable = No END Object AirF_AmericaParticleCannonUplink Buildable = No END Object GLAScudStorm Buildable = No END Object Slth_GLAScudStorm Buildable = No END Object Demo_GLAScudStorm Buildable = No END Object Chem_GLAScudStorm Buildable = No END When i play in skimish it work fin but when i play it with my friend online hecan build a superweapon and i cant (we was the same general), but when he try to build it the game get an error and we D/C. You guys know why this happen.

Posted by: Annihilationzh - Wednesday, July 14, 2010 10:47:29 AM
Because your friend's game isn't running the map.ini. It's a standard issue with map.inis. That's why drummin told you to use a script.

Posted by: hejsil - Wednesday, July 14, 2010 10:51:19 AM
Oh ok, but i cant find the scripts for it anywhere :(

Posted by: Annihilationzh - Wednesday, July 14, 2010 11:34:19 AM
From Drummin [quote]I guess you're stuck with just modifying the "Tech Tree" to Disallow super weapons (under Map/Modify).[/quote] Map>modify>Adjust the tech tree...

Posted by: hejsil - Wednesday, July 14, 2010 12:18:18 PM
Thanks for all the help [grin] [+1] [+1]