Images

Level 8
Joined
Jun 20, 2017
Messages
251
Hey,
I have 4 workers in my map who can build 6 different tier of structures, so basically I'm trying to get those structural icons that they have.
By selecting a worker, it randomly gives structures to the worker!
For example, if you select a Peasant as a worker and then press B, a list of buildings you can build will appear.
I also have an upgrade that can change structures.
There is an issue with creating the image, it creates a weird background behind it!

This is what I've got so far
  • Setup Builder Types
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set VariableSet UnitTypes_Builder[1] = Peasant
      • Set VariableSet UnitTypes_Builder[2] = Peon
      • Set VariableSet UnitTypes_Builder[3] = Acolyte
      • Set VariableSet UnitTypes_Builder[4] = Wisp
      • -------- --------
      • Set VariableSet Integer_BuilderTypes = 4
  • Setup Icons
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • -------- T1 --------
      • Set VariableSet Integer_Temp = 0
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet1[Integer_Temp] = Farm
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNFarm.blp
      • -------- --------
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet1[Integer_Temp] = Burrow
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNTrollBurrow.blp
      • Set VariableSet Regions_Icons[Integer_Temp] = T1 <gen>
      • Set VariableSet Loc = (Point((Min X of Regions_Icons[Integer_Temp]), (Min Y of Regions_Icons[Integer_Temp])))
      • Set VariableSet Integers_TierSet[1] = Integer_Temp
      • -------- --------
      • -------- T2 --------
      • Set VariableSet Integer_Temp = 0
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet2[Integer_Temp] = Barracks
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNHumanBarracks.blp
      • -------- --------
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet2[Integer_Temp] = Barracks
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNBarracks.blp
      • Set VariableSet Regions_Icons[Integer_Temp] = T2 <gen>
      • Set VariableSet Loc = (Point((Min X of Regions_Icons[Integer_Temp]), (Min Y of Regions_Icons[Integer_Temp])))
      • Set VariableSet Integers_TierSet[2] = Integer_Temp
      • -------- --------
      • -------- T3 --------
      • Set VariableSet Integer_Temp = 0
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet3[Integer_Temp] = Altar of Kings
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNAltarOfKings.blp
      • -------- --------
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet3[Integer_Temp] = Altar of Storms
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNAltarOfStorms.blp
      • Set VariableSet Regions_Icons[Integer_Temp] = T3 <gen>
      • Set VariableSet Loc = (Point((Min X of Regions_Icons[Integer_Temp]), (Min Y of Regions_Icons[Integer_Temp])))
      • Set VariableSet Integers_TierSet[3] = Integer_Temp
      • -------- --------
      • -------- T4 --------
      • Set VariableSet Integer_Temp = 0
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet4[Integer_Temp] = Arcane Vault
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNArcaneVault.blp
      • -------- --------
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet4[Integer_Temp] = Voodoo Lounge
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNVoodooLounge.blp
      • Set VariableSet Regions_Icons[Integer_Temp] = T4 <gen>
      • Set VariableSet Loc = (Point((Min X of Regions_Icons[Integer_Temp]), (Min Y of Regions_Icons[Integer_Temp])))
      • Set VariableSet Integers_TierSet[4] = Integer_Temp
      • -------- --------
      • -------- T5 --------
      • Set VariableSet Integer_Temp = 0
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet5[Integer_Temp] = Gryphon Aviary
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNGryphonAviary.blp
      • -------- --------
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet5[Integer_Temp] = Beastiary
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNBeastiary.blp
      • Set VariableSet Regions_Icons[Integer_Temp] = T5 <gen>
      • Set VariableSet Loc = (Point((Min X of Regions_Icons[Integer_Temp]), (Min Y of Regions_Icons[Integer_Temp])))
      • Set VariableSet Integers_TierSet[5] = Integer_Temp
      • -------- --------
      • -------- T6 --------
      • Set VariableSet Integer_Temp = 0
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet6[Integer_Temp] = Town Hall
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNTownHall.blp
      • -------- --------
      • Set VariableSet Integer_Temp = (Integer_Temp + 1)
      • Set VariableSet UnitTypes_TowerSet6[Integer_Temp] = Great Hall
      • Set VariableSet Strings_TowerIcon[Integer_Temp] = ReplaceableTextures\CommandButtons\BTNGreathall.blp
      • Set VariableSet Regions_Icons[Integer_Temp] = T6 <gen>
      • Set VariableSet Loc = (Point((Min X of Regions_Icons[Integer_Temp]), (Min Y of Regions_Icons[Integer_Temp])))
      • Set VariableSet Integers_TierSet[6] = Integer_Temp
  • Icons
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Peasant
          • (Unit-type of (Triggering unit)) Equal to Peon
          • (Unit-type of (Triggering unit)) Equal to Acolyte
          • (Unit-type of (Triggering unit)) Equal to Wisp
    • Actions
      • Image - Create an image using Strings_TowerIcon[Integer_Temp] of size ((Max X of Regions_Icons[Integer_Temp]) - (Min X of Regions_Icons[Integer_Temp])) at Loc with Z offset 0.00 using image type Indicator
      • Set VariableSet img[1] = (Last created image)
      • Image - Change img[1]: Enable render always state
      • Custom script: call RemoveLocation(udg_Loc)
      • -------- --------
      • Image - Create an image using Strings_TowerIcon[Integer_Temp] of size ((Max X of Regions_Icons[Integer_Temp]) - (Min X of Regions_Icons[Integer_Temp])) at Loc with Z offset 0.00 using image type Indicator
      • Set VariableSet img[2] = (Last created image)
      • Image - Change img[2]: Enable render always state
      • Custom script: call RemoveLocation(udg_Loc)
      • -------- --------
      • Image - Create an image using Strings_TowerIcon[Integer_Temp] of size ((Max X of Regions_Icons[Integer_Temp]) - (Min X of Regions_Icons[Integer_Temp])) at Loc with Z offset 0.00 using image type Indicator
      • Set VariableSet img[3] = (Last created image)
      • Image - Change img[3]: Enable render always state
      • Custom script: call RemoveLocation(udg_Loc)
      • -------- --------
      • Image - Create an image using Strings_TowerIcon[Integer_Temp] of size ((Max X of Regions_Icons[Integer_Temp]) - (Min X of Regions_Icons[Integer_Temp])) at Loc with Z offset 0.00 using image type Indicator
      • Set VariableSet img[4] = (Last created image)
      • Image - Change img[4]: Enable render always state
      • Custom script: call RemoveLocation(udg_Loc)
      • -------- --------
      • Image - Create an image using Strings_TowerIcon[Integer_Temp] of size ((Max X of Regions_Icons[Integer_Temp]) - (Min X of Regions_Icons[Integer_Temp])) at Loc with Z offset 0.00 using image type Indicator
      • Set VariableSet img[5] = (Last created image)
      • Image - Change img[5]: Enable render always state
      • Custom script: call RemoveLocation(udg_Loc)
      • -------- --------
      • Image - Create an image using Strings_TowerIcon[Integer_Temp] of size ((Max X of Regions_Icons[Integer_Temp]) - (Min X of Regions_Icons[Integer_Temp])) at Loc with Z offset 0.00 using image type Indicator
      • Set VariableSet img[6] = (Last created image)
      • Image - Change img[6]: Enable render always state
      • Custom script: call RemoveLocation(udg_Loc)
 

Attachments

  • 122.jpg
    122.jpg
    90.7 KB · Views: 12
  • Images.w3x
    23.9 KB · Views: 2
Last edited:
Top