• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Altered Melee Trigger Bug

Level 8
Joined
Jun 15, 2013
Messages
122
Hello there
I am making an altered melee where I modify units for the player at the start
Except I have an issue with my Undead and Night Elves race who don't use the Haunted/Entangled Gold mine
So I get an extra worker which is stucked in the middle of the gold mine

The undead race also has one worker less

So I prolly need to add one line for each race but dunno which

Any help would be appreciated

Cordially

Grimm
 

Attachments

  • Trigger2.JPG
    Trigger2.JPG
    47.8 KB · Views: 11
  • Trigger1.JPG
    Trigger1.JPG
    55.1 KB · Views: 12
  • In game.jpg
    In game.jpg
    332.9 KB · Views: 13
Level 29
Joined
Sep 26, 2009
Messages
2,595
Your trigger's logic is:
Code:
If
  picked unit-type == Tree of Life
Then
  replace picked unit for Corrupted Tree of Life
Else
  replace unit for Skeletal Worker.
Entangled Gold mine belongs to the picked player and Entangled Gold Mine != Tree of Life, so it is replaced by Skeletal Worker.

Fix is simple: instead of replacing picked unit for Skeletal Worker, add another If/Then/Else into the 'Else' block of the first If/Then/Else with the following conditions:
Code:
If
  picked unit-type == Wisp
Then
  replace picked unit for Skeletal Worker
Else
  remove picked unit
Removing Haunted/Entangled Gold mine reverts it back to the 'neutral' gold mine that Human/Orc players use.

So the full trigger should have the following structure:
Code:
If
  picked unit-type == Tree of Life
Then
  replace picked unit for Corrupted Tree of Life
Else
  If
    picked unit-type == Wisp
  Then
    replace picked unit for Skeletal Worker
  Else
    remove picked unit
Same approach should be used for undead.
As for undead having less workers: since you know that you are replacing undead and it has one worker less, you can just create additional worker after replacing the current ones.

Also, the "Player - Limit training" actions are for player, not units, so it makes no sense to have those actions inside "Pick every unit" action, since those actions are repeatedly executed (once per each picked unit).
 
Level 8
Joined
Jun 15, 2013
Messages
122
Alright managed to fix NE thx to your suggestion
But undead is not quite alright yet, it is playable but how to put those workers on the right spot?

Still gonna change thread to solved considering its almost fixed

COrdially

Grimm
 

Attachments

  • Warcraft III 2024-06-02 23-16-44-97.jpg
    Warcraft III 2024-06-02 23-16-44-97.jpg
    351.4 KB · Views: 8
Top