Jump to content


Photo

I've believe I've disguised a bomb truck.


  • Please log in to reply
22 replies to this topic

#21 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 11 August 2004 - 11:51 AM

This has always worked. Suppose:

"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.
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#22 Akkrand

Akkrand
  • New Members
  • 61 posts
  • Location:Melbourne, Australia

Posted 12 August 2004 - 01:28 AM

Ignoring for now the possibility that I was not the first to do a bombtruck diguise (which I really don't care about, I'm after a hard AI, not the credit), I have refined how mine disguises, using less reliance on global variables, hence making it easier and less 'clunky' for multiple bomb trucks to be disguising & attacking at the same time.
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:

*** 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'.

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.

Then one of three upgrade scripts,
Bomb Truck Upgrade HE:

*** 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 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'.

Bomb Truck Upgrade HE/Bio:

*** 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. :rolleyes:

Cheers,
Lord Akkrand

Attached Files



#23 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 12 August 2004 - 08:55 AM

You're making a dynamic attack paths download too? Very good! I'll put this up together with a "fade to white" script which DZ made in progen.

You're very helpful :rolleyes:

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.
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users