←  Mapping Support

Fallout Studios Forums

»

Armor general in single player editing

The Shell's Photo The Shell 26 Apr 2008

I am working on a single player map. I have General Ironside as one of the players but I have come across a few problems.
  • When getting him to build vaporiser cannons, it seems only possible to do this by having module bunkers in his build list, name them and for them to trigger a [S A nD] script:
    *** IF ***
    	True.
    *** THEN ***
       Unit &#39;<This Object>&#39; use Ability &#39;Armor_Command_ConstructAmericaVulcanTurret_Dummy&#39;.

    but doing this seems to make the AI build several module bunkers > vaporiser turrets in the same place, sometimes overlapping, as the ones on the build list thus hogging all of his power output. How do I make him stick only to the build list?
  • He doesn't rebuild his command center despite setting rebuilds to unlimited. What's up with that?
  • I have him build 2 supply trucks in a team so they can get replaced if they get destroyed but the 2nd truck that comes out doesn't bother to gather from the supply dock a very short distance away. This is the [S A nD] script I use (called Armor Team Conditions) for all of his teams (including attacking inf, vehicles, dozers and the trucks):
    *** IF ***
    	True.
    *** THEN ***
      Null operation. &#40;Does nothing.&#41;

    and the team settings (values differing from default):
    Team name: Armor trucks
    Owner: PlyAmericaArmorGeneral
    Condition: Armor Team Conditions
    Priority: 2000
    Min:2 Max:2 Unit Type: Armor_AmericaVehicleSupplyTruck

    Flag(s): Automatically reinforce wherever possible.
    So I have no idea.


Thanks for any help you can offer.
Edited by hl_world, 26 April 2008 - 15:20.
Quote

Dauth's Photo Dauth 26 Apr 2008

This belongs in the MG help/SHW section, I hope they can help you out. I'll move to the help and the guild council can decide from there.
Quote

Lord Atlantis's Photo Lord Atlantis 26 Apr 2008

Well, for the building of the vaporizer turret module, you need to set the script to one once then deactivate. THen when it needs to be replaced, create an activation script to reactivate the upgrade Concrete Slab script.
Quote

nip's Photo nip 26 Apr 2008

Are you using the Build List tool in WB for your vaporizer thingy? You can't reference faction structures placed through the Build List tool in scripts. And the subroutine script you're using to build is looping, a subroutine script cannot be disabled thus is building multiple times.

I'm using two scripts for Chinese supply truck rebuild in my latest mission.

SupplyTruck_Enable
*** IF ***
    Timer &#39;SupplyTruck_BUILD&#39; has expired.
*** THEN ***
  Enable Script &#39;SupplyTruck_Build&#39;.

(by default this script is disabled, uncheck &#39;Script is active&#39;)



SupplyTruck_Build
*** IF ***
     Player &#39;China&#39; has lost an object of type &#39;ChinaVehicleSupplyTruck&#39; (can be an object type list).
*** THEN ***
   Unit &#39;Structure_ChinaSupplyCenter&#39; use Ability &#39;Command_ConstructChinaVehicleSupplyTruck&#39;.
  Set timer &#39;SupplyTruck_BUILD&#39; to expire in 5.00 seconds.
  Enable Script &#39;SupplyTruck_Enable&#39;.

The action 'Unit 'Structure_ChinaSupplyCenter' use Ability 'Command_ConstructChinaVehicleSupplyTruck'.' can be used multiple times in a script and the structure then build the number of supply trucks. Note the AI needs money to build, and you should use the actions 'Set a player to be able to build buildings' and 'Set a player to be able to build units'.
Quote

The Shell's Photo The Shell 26 Apr 2008

Thanks but for each of your scripts, Lord Atlantis and nipthecat, what are the [S A D] flags?

I used the build list tool and put down a couple of concrete slabs. Do they have to have their own scripts each?
Quote

Pav:3d's Photo Pav:3d 26 Apr 2008

View Posthl_world, on 26 Apr 2008, 22:10, said:

Thanks but for each of your scripts, Lord Atlantis and nipthecat, what are the [S A D] flags?


this is an example:

Posted Image

sorry ill go now....
Quote

Crazykenny's Photo Crazykenny 27 Apr 2008

Spamming in my forums?!

*tortures pav3d*
Quote

-Xv-'s Photo -Xv- 27 Apr 2008

View PostPav3d, on 26 Apr 2008, 22:36, said:

View Posthl_world, on 26 Apr 2008, 22:10, said:

Thanks but for each of your scripts, Lord Atlantis and nipthecat, what are the [S A D] flags?


this is an example:

Posted Image

sorry ill go now....


rofl

Agreed XD
Quote

The Shell's Photo The Shell 27 Apr 2008

I think I know why the AI keeps building concrete slabs around their originals, correct me if I'm wrong here:
  • The first slab gets built under build list
  • 1st slab follows [S A nD] script "<This object> uses command ability [build vaporiser turret]"
  • 1st slab turns into vaporiser turret making the AI player 'lose' the concrete slab. Side note: concrete slab loses its name in build list settings
  • AI thinks 1st slab has been destroyed and so builds another on build list settings "rebuilds: unlimited"
  • 2nd slab gets built and process loops.

How would I get the AI to only replace vaporiser turret with concrete slab if it gets destroyed?
Edited by hl_world, 27 April 2008 - 19:11.
Quote

Lord Atlantis's Photo Lord Atlantis 27 Apr 2008

Have it get a name (VaproizerTurret1) so that it can only be rebuilt when the concerte slab is destroyed and "VaproizerTurret1" does not exist.
Quote

The Shell's Photo The Shell 27 Apr 2008

I gave it the concrete slab "vaporiser South" in build list but like I said with that side note in step 3 it loses it's name when it tranforms into a vaporiser turret. Without a name it can't be referenced.

Also, how would I get the AI to build a particular building in a particular location in scripting?

Is there a script action available to give a unit/building a name while the game is running?
Quote

JJ's Photo JJ 12 May 2008

Add this map.ini to your map so you can make the AI build the separate defenses without building the Concrete Slab first, so you don't have to script the AI to upgrade the Slabs. Just ask the AI to construct Armor_AmericaVulcanTurret, Armor_AmericaGuardianDefenceTurret or Armor_AmericaGazerTurret directly.
Quote