Jump to content


Armor general in single player editing


11 replies to this topic

#1 The Shell

    Amateur

  • Member
  • 117 posts

Posted 26 April 2008 - 15:19

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.


#2 Dauth

    <Custom title available>

  • Gold Member
  • 11193 posts

Posted 26 April 2008 - 15:38

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.

#3 Lord Atlantis

    I am Iron Man

  • Member
  • 3807 posts

Posted 26 April 2008 - 18:31

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.
Posted Image

#4 nip

    Grunze-Catz

  • Member
  • 608 posts

Posted 26 April 2008 - 19:28

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

#5 The Shell

    Amateur

  • Member
  • 117 posts

Posted 26 April 2008 - 21:10

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?

#6 Pav:3d

    YOUR WORLDS WILL BECOME OUR LABORATORIES

  • Project Leader
  • 7224 posts
  • Projects: EC, CORE, ER

Posted 26 April 2008 - 22:36

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

Posted Image

Posted Image

#7 Crazykenny

    Eternal Glow

  • Project Team
  • 7683 posts

Posted 27 April 2008 - 00:02

Spamming in my forums?!

*tortures pav3d*
Posted Image

#8 -Xv-

    Teh Titelz

  • Member
  • 910 posts
  • Projects: ShockWave Balance

Posted 27 April 2008 - 02:21

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

Posted Image




Hamachi Status: : Posted Image

Much thanks to p4ved for siggy ;)

#9 The Shell

    Amateur

  • Member
  • 117 posts

Posted 27 April 2008 - 19:09

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.


#10 Lord Atlantis

    I am Iron Man

  • Member
  • 3807 posts

Posted 27 April 2008 - 22:08

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

#11 The Shell

    Amateur

  • Member
  • 117 posts

Posted 27 April 2008 - 22:39

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?

#12 JJ

    Half dead member

  • Project Leader
  • 3294 posts
  • Projects: Real life things, personal RA3 mod

Posted 12 May 2008 - 13:35

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.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users