I've believe I've disguised a bomb truck.
#21
Posted 11 August 2004 - 11:51 AM
"Team 'Bombtrucks' use Ability 'Command_DisguiseAsVehicle' on nearest object of type 'AircraftCessna'."
instead of AircraftCessna we have Tanks. Now, if you or your ally has tanks near the bombtruck, it will disguise as an allied tank and not an enemy one. The commandbutton hunt is so far the only thing that makes this possible - this works because AircraftCessna is possibly not owned by the faction that owns the bombtruck.
#22
Posted 12 August 2004 - 01:28 AM
From scratch, I have a script which initialises the one global variable (the timer):
Initialse Bomb Truck Variables:
*** IF ***
True.
*** THEN ***
Set timer 'Bomb_Truck_Disguise_Timer' to expire in 1 frames.
Then I have the disguise script:
Bomb Truck Disguise:
*** IF ***
True.
*** THEN ***
Have Team '<This Team>' use Attack priority set 'GLA Disguise Priority'.
Team '<This Team>' begins hunting using Ability 'Command_DisguiseAsVehicle'.
Set timer 'Bomb_Truck_Disguise_Timer' to expire in 5.00 seconds.
Set Team '<This Team>' to 'Disguised'.
Then the attack script:
Bomb Truck Attack:
Note of course that you could simply have Team <This Team> begins hunting, also you could remove the 'Have Team '<This Team>' use Attack priority set 'GLA Supply Lines Priority'.' and have it set your own priority in the Generic tab of each team using the 'GLA Apply X Priority' scripts.*** IF ***
Timer 'Bomb_Truck_Disguise_Timer' has expired.
*AND* Team '<This Team>' state IS 'Disguised'
*** THEN ***
Have Team '<This Team>' use Attack priority set 'GLA Supply Lines Priority'.
Set Team '<This Team>' to 'Attacking'.
Run Subroutine 'Attack Dynamic Center'.
Then one of three upgrade scripts,
Bomb Truck Upgrade HE:
Bomb Truck Upgrade Bio:*** IF ***
Team '<This Team>' state IS 'Attacking'
*** THEN ***
100.00% of Team '<This Team>' perform Ability 'Command_UpgradeGLABombTruckHighExplosiveBomb'.
Set Team '<This Team>' to 'Upgraded'.
Bomb Truck Upgrade HE/Bio:*** IF ***
Team '<This Team>' state IS 'Attacking'
*** THEN ***
100.00% of Team '<This Team>' perform Ability 'Command_UpgradeGLABombTruckBioBomb'.
Set Team '<This Team>' to 'Upgraded'.
*** IF ***
Team '<This Team>' state IS 'Attacking'
*** THEN ***
50.00% of Team '<This Team>' perform Ability 'Command_UpgradeGLABombTruckHighExplosiveBomb'.
50.00% of Team '<This Team>' perform Ability 'Command_UpgradeGLABombTruckBioBomb'.
Set Team '<This Team>' to 'Upgraded'.
I don't recall if a bombtruck can upgrade both HE & Bio, but you could conceivably alter the third one to raise the %'s to 100% for both. You could also put extra conditions checked for available cash when doing the upgrade.
These scripts are not faction dependant, and so can be imported and popped into any GLA faction, so long as your Bomb Truck teams do the following:
OnCreate:
Bomb Truck Disguise
Generic:
Bomb Truck Attack
and/or
Bomb Truck Upgrade HE
or Bomb Truck Uprade Bio
or Bomb Truck Upgrade HE/Bio
Since its generic, I've uploaded an .scb of these 6 scripts which can be imported straight onto the faction you want to use them, then just alter your teams to suit. Don't forget that Demolition Gen can't use Bio Bombs, nor Toxin Gen use HE Bombs.
I'm really starting to try to make as many 'Generic' scripts as possible, which the intention of eventually deleting all the scripts in a faction, and starting that faction from pre-made scripts from scratch, so I know exactly what its doing. The Bomb Truck scripts I've got here would just be one 'Generic' module I could import, as will the Dynamic Attack Paths once I clean it up a bit.
Cheers,
Lord Akkrand
Attached Files
#23
Posted 12 August 2004 - 08:55 AM
You're very helpful
I'm after a hard AI, not the credit
Yes that's the spirit; we are scripters not lawyers.
The idea of script modules occured to me a while ago- in a different form though. I was thinking of making a set of generic enhancement scripts that any user can import and adapt into their AI. Lacking ideas and time I put that idea on hold.. now I've got time to think about it again.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users