News:
» Current News
» Archive News
Features:
» Tutorials
» Downloads
Community:
» Forum
Random Tip:
22.When exporting skirmish scripts, always select "Export all scripts" don't make this mistake when you've done hours of scripting...
|
» View All Tips
Site:
» Staff
» Contact Us
Affiliates:
» Atomic Wiener Dog
» CNC Reneclips
» GenDev
» Project Perfect Mod
» The Finest Hour
» Warhammer40k: DoW SDI
» YR Argentina
|
Getting the Bombtruck to disguise properly
Title: Getting the Bombtruck to disguise properly
Difficulty: Basic AI Scripter
Author(s): SDI Team, concept\implementation by Akkrand
Game Type: Both Regular Generals and Zero Hour
Thanks to Lord Akkrand for figuring this out
If you do the obvious first thing to solve this problem, which is telling a bombtruck team to use the "Command_DisguiseAsVehicle" commandbutton on
the nearest enemy object with KindOf 'VEHICLE', you will find that the bombtruck team will simply not do it. Thankfully, Akkrand has found
out how to work around this.
First, you need to edit a bombtruck's INI file. There are different bombtrucks for every GLA general in ZH, so keep that in mind.
Add this module to a bombtruck's INI (the bombtrucks are in any of these files: GLAVehicle, DemoGeneral, StealthGeneral or ChemicalGeneral.ini, for
regular Generals it is in FactionUnit.ini):
Behavior = CommandButtonHuntUpdate BTDisguiseHunt
; nothing
End
Next, import your scripts as usual. Initialize a flag named 'Bombtruck_Is_Disguised' to FALSE somewhere in your early scripts and set a timer called 'Bombtruck_Disguise_Done' to expire in 0.01 seconds(in ZH you can place the initializations in
the Init Variables script, in regular Generals it can be done in the Turn Everything On script, both of which are in the Paper Work folder).
Now construct the following scripts:
Script name: GLA Bombtruck Disguise
***IF***
True.
***THEN***
100.00% of Team '' perform Ability 'Command_UpgradeGLABombTruckHighExplosiveBomb'.
Team '' begins hunting using Ability 'Command_DisguiseAsVehicle'.
Set timer 'Bombtruck_Disguise_Done' to expire in 5.00 seconds.
Set Flag named 'Bombtruck_Is_Disguised' to TRUE
Script name: GLA Bombtruck Switch To Attack
***IF***
Timer 'Bombtruck_Disguise_Done' has expired.
*AND* Flag named 'Bombtruck_Is_Disguised' IS TRUE
***THEN***
Team '' begins hunting.
Script name: GLA Bombtruck Reset Flag
Script flags\evaluation: Active, Every second
***IF***
Bombtruck_Disguise_Done timer has expired.
AND Flag Bombtruck_Is_Disguised is TRUE
***THEN***
Set Flag Bombtruck_Is_Disguised to FALSE.
Put the "GLA Bombtruck Disguise" script into the On Create slot and the "GLA Bombtruck Switch To Attack" into a Generic slot. Once the team is built, the bombtruck will hunt using the ability (among other things),
thus disguise itself, after 5 seconds the script in the Generic tab will hunt enemies. Pretty simple, really...
|