Upgrade ability

niceone

New Member
Reaction score
3
Hello

I am making a map where I want a good autospawn creep building.

I already have the building + creeps it gonna spawn.

I already have the triggers and variables to make the autospawn work right.

The only thing I need is an ability to upgrade the creep spawn so when

LV 1 => 1 creep spawns
LV 2 => 2 creeps spawn
etc.

I already have the variables and trigger for that set up but I can't find an ability which does absolutely nothing and is upgradeable... and where I can ask money for.

Or do I just have to make 20 units that sell from there and have to make them available / unavailable?

Thanks in advance.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
you said you want an ability which costs gold / lumber?
"charge gold / lumber" is an ability which does absolutely nothing, its only purpose is for custom triggers.
 

niceone

New Member
Reaction score
3
Trigger:
  • Upgrade auto spawn
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Upgrade Creep
    • Actions
      • Wait 0.01 seconds
      • Unit - Set level of Upgrade Creep for (Triggering unit) to ((Level of Upgrade Creep for (Triggering unit)) + 1)


If I set the ability like this it takes about 5 seconds for the interface to update the level of it and the cost... Is this normal?

EDIT: And if it finally updates its cost it doesn't update it's text or etc.
 

0WN3D

New Member
Reaction score
15
If your building belongs to a nulled player(creep spawns) then you need to upgrade it via triggers and add unit to the 'upgrader tower'. Jus add the unit at the start of the game then when a Hero buys a unit, remove the unit from the shop, set level of ability then add the next level unit to the shop to be bought.
 

niceone

New Member
Reaction score
3
OK that doesn't get close what I meant.

And I ask how to force the GUI to update itself?

Here are all triggers that go with it.

Trigger:
  • Auto spawn building disable
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Auto Spawn
    • Actions
      • Set AutoSpawnYesNo[(Player number of (Triggering player))] = True
      • Player - Make Auto Spawn Unavailable for training/construction by (Owner of (Triggering unit))


Trigger:
  • Auto spawn building
    • Events
      • Time - IncomeTimer expires
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AutoSpawnYesNo[(Integer A)] Equal to True
              • Or - Any (Conditions) are true
                • Conditions
                  • (Player((Integer A))) Equal to Player 1 (Red)
                  • (Player((Integer A))) Equal to Player 2 (Blue)
                  • (Player((Integer A))) Equal to Player 3 (Teal)
                  • (Player((Integer A))) Equal to Player 4 (Purple)
                  • (Player((Integer A))) Equal to Player 5 (Yellow)
            • Then - Actions
              • Set Temp_Point_Orange_S = (Random point in Team Teal Spawn <gen>)
              • Unit - Create AutospawnHowMutch[(Integer A)] AutospawnUnitType[AutospawnNumber[(Integer A)]] for Player 11 (Dark Green) at Temp_Point_Orange_S facing 90.00 degrees
              • Special Effect - Create a special effect at Temp_Point_Orange_S using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation (udg_Temp_Point_Orange_S)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AutoSpawnYesNo[(Integer A)] Equal to True
              • Or - Any (Conditions) are true
                • Conditions
                  • (Player((Integer A))) Equal to Player 6 (Orange)
                  • (Player((Integer A))) Equal to Player 7 (Green)
                  • (Player((Integer A))) Equal to Player 8 (Pink)
                  • (Player((Integer A))) Equal to Player 9 (Gray)
                  • (Player((Integer A))) Equal to Player 10 (Light Blue)
            • Then - Actions
              • Set Temp_Point_Teal_S = (Random point in Team Orange Spawn <gen>)
              • Unit - Create AutospawnHowMutch[(Integer A)] AutospawnUnitType[AutospawnNumber[(Integer A)]] for Player 12 (Brown) at Temp_Point_Teal_S facing 270.00 degrees
              • Special Effect - Create a special effect at Temp_Point_Teal_S using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation (udg_Temp_Point_Teal_S)
            • Else - Actions


Trigger:
  • Upgrade auto spawn
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Upgrade Creep
    • Actions
      • Wait 0.01 seconds
      • Unit - Increase level of (Ability being cast) for (Triggering unit)
 

Ayanami

칼리
Reaction score
288
Trigger:
  • Upgrade auto spawn
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Upgrade Creep
    • Actions
      • Wait 0.01 seconds
      • Unit - Set level of Upgrade Creep for (Triggering unit) to ((Level of Upgrade Creep for (Triggering unit)) + 1)


If I set the ability like this it takes about 5 seconds for the interface to update the level of it and the cost... Is this normal?

EDIT: And if it finally updates its cost it doesn't update it's text or etc.

What's the 0.01 seconds wait for? Well, it's actually "bugged". To properly display your updated text in that instance, you'll have to remove the ability and add it back straight away and set the ability level.
 

niceone

New Member
Reaction score
3
Ok now atleast the cost updates directly :/ only text stays always on lvl 1 -_-'

Its vague why I have to use the wait but otherwize he would deduct the next level cost from the player instead of the current.

Trigger:
  • Upgrade auto spawn
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Upgrade Creep
    • Actions
      • Wait 0.01 seconds
      • Unit - Increase level of (Ability being cast) for (Triggering unit)
      • Player - Disable (Ability being cast) for (Triggering player)
      • Player - Enable (Ability being cast) for (Triggering player)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top