SDI title

  Current News
  Archive News



  Random Tip:
20.Use the 10 x time accelerator function in the script debugger so that you won't have to wait hours for things to happen. If it appears to be slower than the original try turning down the detail settings.
  View All Tips

  Contact Us

  Atomic Wiener Dog
  CNC Reneclips
  Project Perfect Mod
  The Finest Hour
  Warhammer40k: DoW SDI
  YR Argentina

Getting the Missile Defender to use the Laser Lock

Title: Getting the Missile Defender to use the Laser Lock
Difficulty: Novice AI Scripter
Author(s): SDI Team
Game Type: Regular Generals

First the usual routine, open up World Builder, go to Edit>Player List and click "Add Skirmish Players". Next click "Ok" and go to Edit>Scripts and click "Import Scripts". Select your which should be in your Command and Conquer Generals\Data\Scripts\ folder.

Open up the "Generic Attack" folder in SkirmishAmerica. Click "New Script" and name it "USA Laser Lock". Uncheck "Deactivate upon success" and check "Script is Subroutine". Go to the Actions if true tab and replace "Null operation" with "[Team] Set to hunt using commandbutton ability". Team'???' should be replaced with 'This Team" and Ability '???' with 'Command_AmericaMissileDefenderLaserGuidedMissiles'. Click "Ok" and "Ok" again in the scripts editor then go to Edit>Teams.

Now we have to define specific teams to use the ability. Just to test this effect select "SkirmishAmerica" then scroll down till you see the "USA D5E Crusader" team and double click it. As you can see there's 1 crusader defined. Replace that one crusader with one AmericaInfantryMissileDefender. Change the team label if you want, but this is only to test if the effect works.
Go to the "Behavior" tab and in the "On Create" box find "USA Laser Lock". Now the scripting part is done. Click "Ok" and "Ok" again in the teams editor and go to Edit>Scripts again. Now export the scripts overwriting the

Because we have told the team to hunt using a commandbutton ability, the object's INI will need a module for that. Open up FactionUnit.ini, as extracted from INI.big and find "AmericaInfantryMissileDefender".

Scroll down till you see the "Physics Behavior" and after its "End" insert the following module:

Behavior = CommandButtonHuntUpdate ModuleTag_07 ; allows use of command button hunt script with this unit.

That's it, now save the INI file and open up a skirmish game, playing against an easy USA opponent. Send a vehicle or aircraft to his base and you'll see that you'll be hunted with the Missile Defender's Laser Lock ability once you get in its range.

You can, and please do, expand this onto other teams. Make new teams with lots of missile defenders and tell them to hunt using the laser lock ability. If you need help creating a new team consult the "Adding new units" tutorial.

SDI is part of the Revora Creative Network.
Orange Block design created by Detail 2004 Revora Creative Network.
Content Revora Creative Network 2004 - 2008