• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Need help with hero selection system

Status
Not open for further replies.
Level 1
Joined
Jan 28, 2010
Messages
4
so the goal I have with this is, each player gets a spirit(wisp), the spirit will have some abilities to select a race, then the spirit will have some abilities to select a hero, this will spawn a hero and some units at the spirit's position while playing an effect, this will let the player choose where they start on my map,

I have created a basic map with some triggers to suss out whether it is a good idea and what limitations it will have

but I have run into a problem, no matter what I do it summons the same hero(The paladin), I have fiddled with everything I can think of so I need some more eye's to see what I have done wrong

here is two of the triggers, there are four but the only thing that changes is what ability it is suppose to be detecting and what unit to spawn

  • SpiritSpawnHumanPaladin
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Paladin (Spirit)(Human)
    • Actions
      • Unit - Create 1 Paladin for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Unit - Remove (Casting unit) from the game
  • SpiritSpawnHumanBloodMage
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Blood Mage (Spirit)(Human)
    • Actions
      • Unit - Create 1 Blood Mage for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Unit - Remove (Casting unit) from the game
I have also attached the map

the only thing I can think of is it might something to do with the abilities, I remember someone having similar trouble but I am failing to find the thread
 

Attachments

  • HeroSelection.w3x
    110.6 KB · Views: 38
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,576
It's because abilities in Warcraft 3 use Order Strings and your Blood Mage ability has the same Order String as your Paladin ability. This is because they're based on the same ability.

For example, if you give a Hero two abilities based on Storm Bolt, it doesn't matter if they have two different names, they share the same Order Id. When you try to cast one of the abilities the Unit is issued the "stormbolt" Order, and since both of these Abilities use that Order Id they will conflict with one another. In your case the game is always choosing to use the Paladin ability, hence the Paladin spawning. Your triggers work fine it's just the mechanics of Warcraft 3 causing you trouble.

The fix to this is to use different base abilities OR the better option in my opinion is to use the Channel ability.

The Channel ability is unique in that it's designed to be used for Triggered effects. It offers far greater control than your standard ability. In this case you want to set it's fields to this:

1) Set it's Options field to VISIBLE, otherwise the ability will be hidden (although the unit will technically still have the ability, and can be ordered to use the ability through triggers, which can be rather useful in some cases)
2) Turn off "Disable Other Abilities" (this pauses the unit while it channels the ability, but we're going to remove the "channeling" property from the ability so turn this off)
3) Set Follow-Through time to 0.00 (this is how long the ability WOULD be channeled if we wanted it to channel in the first place)
4) Give each Channel ability a unique Base Order Id (you'll see a list of every single Order String in the game, you shouldn't run into any problems as long as your abilities don't share the same Order).

Spells - Channel <-- Note that this tutorial is a little outdated/incorrect on some things, but it should provide enough info to get you started.
 
Last edited:
Level 1
Joined
Jan 28, 2010
Messages
4
Awesome, I went the Channel ability route and it worked perfectly. I knew I was forgetting something but could not put my finger on it

thanks
 
Status
Not open for further replies.
Top