» Current News
» Archive News
» View All Tips
14.Use the "[Team] Use commandbutton ability" script in case you have made a CommandSet upgrade to include new commandbuttons on the same object. Select the factions generic team which has the prefix "team" before the actual name (e.g. teamSkirmishAmerica).
» Contact Us
» Atomic Wiener Dog
» CNC Reneclips
» 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
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
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
Timer 'Bombtruck_Disguise_Done' has expired.
*AND* Flag named 'Bombtruck_Is_Disguised' IS TRUE
Team '' begins hunting.
Script name: GLA Bombtruck Reset Flag
Script flags\evaluation: Active, Every second
Bombtruck_Disguise_Done timer has expired.
AND Flag Bombtruck_Is_Disguised is TRUE
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...