Adding a race

Status
Not open for further replies.
Level 6
Joined
Jul 12, 2013
Messages
122
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.
 
If it helps. Here is a screenshot of triggers.
 

Attachments

  • Melee Initialization.png
    Melee Initialization.png
    18.9 KB · Views: 80
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.
Back
Top