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

[Trigger] Simple fix for a simple problem?

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I have 4 spellbooks that i have created for a hero. I have aleady given him the spellbooks. However Whenever the hero is randomly selected, the hero is created without the spellbooks. I have already created the array for the spellbooks. But how do i configure it so the wizard - if he is randomed will get these spellbooks?
 
Erm, well... detect which unit has been randomed and if the unit type = the wizard, add the spell books?

If the unit is created with triggers, you can use:
  • actions
    • If Unit type of (Last created unit) = Wizard
    • Then (actions)
      • For each Integer A from 1 to 4 do (Actions)
        • Loop Actions
          • add Spellbook[Integer A] to (Last created unit)
    • Else (actions)
Add this to the trigger which randoms the hero.

I didn't open my WE, but it should look something like this... I think.
If this isn't the problem, then explain it a little bit better, please :p
 
Status
Not open for further replies.
Top