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

Adding a race

Status
Not open for further replies.
Level 5
Joined
Jul 12, 2013
Messages
118
Hello. I created an additional race without changing the old ones. Regarding triggers, I keep boots melee changing except for the victory conditions so that my buildings are recognized
Then I made ​​sure that when player 1 chosen humans, the classic building is replaced by one that I created, and it works very well. I also made sure that the five farmers are replaced by those that I created. But now, one of the five farmers is replaced and not know why ?
Does anyone have an idea? Or another way to allow the addition of the race created? In advance, thank you.
PS. Sorry for the English. I'm French.
 
Level 5
Joined
Jul 12, 2013
Messages
118
If it helps. Here is a screenshot of triggers.
 

Attachments

  • Melee Initialization.png
    Melee Initialization.png
    18.9 KB · Views: 64
Level 28
Joined
Sep 26, 2009
Messages
2,520
Ah this is simple - you don't replace every peasant, but 1 random peasant.

Instead of the action "replace random unit" use this:
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching ((Unit-type of (Matching unit)) Equal to Peasant)) and do (Actions)
    • Loop - Actions
      • Unit - Replace (Picked unit) with a Your_new_Peasant using The old unit's relative life and mana
Have the custom script before the group, it removes memory leak.
 
Status
Not open for further replies.
Top