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

Putting spells to hero

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,602
Hello.

I'm now making game, where people have to send units and heroes to "war". Computer moves those units and heroes. This game is almost complete and I have tested this game many times in battle.net. I still have few problem.

I have problem when heroes level up. Computer don't just put leveling hero new skill. It's stupid, because they are just using spell, which player have chosen in beginning.

There is other problem, that there is many heroes. All the basic heroes from ladder, so 24 heroes.

So, is there any "easy" trigger, that computer will choose new spell to hero when he to he/she gains new level.
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
Well, first you should create a trigger like this :
  • Init Spells
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Abilities[1] = Acid Bomb
      • Set Abilities[2] = Banish
      • Set Abilities[3] = Bladestorm
      • Set Abilities[3] = Blizzard
      • Set Abilities[4] = Chain Lightning
      • Set Abilities[5] = Critical Strike
Abilities[array] and then the spell to be determinated.
This will grant you the ability adding random spells in the next trigger.
Your next trigger should contain the following :
  • Add Spells
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Unit - Add Abilities[(Random integer number between 1 and 5)] to (Triggering unit)
From here on you can build on it.
To prevent adding twice spells at one unit you may use conditions to ignore this.


Another option when a hero gains a level is :
  • Add Spells
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Hero - Learn skill for (Leveling Hero): Human Archmage - Blizzard
 
Status
Not open for further replies.
Top