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

need a mount trigger to a hero

Status
Not open for further replies.
Level 2
Joined
Oct 31, 2007
Messages
17
hello people,
I am trying to do a hero ability that when he uses he mount the hippogryf
the ability is similar to the archer and hhyppogrif one, mount and dismount, but it will create another hero,but i have got some problems to do it :cry:.

First: When the hero uses the ability he dies.
Second: I dont know, but i am using the resulting unit like a hero, because I think that when he fuse, he will stop gaining xp if the resulting unit is not a hero.
Third: The resulting hero isn´t in the same level of the starting hero

I hope someone can help me, it would give me a lot of help, because i think that this ability is one of the most importants to my hero
 
Level 2
Joined
Oct 31, 2007
Messages
17
well you can use the metmothasic spell from the main to the new they u will be same lvl and gain exp

i think that there is two problem using that skill
first: it wont unit two units, it will create another from the first, of course that i can change that with triggers
second: it will have time and i don't want time i want mount and dismount

What do you think if i enable deactivate the skill so it can work like mount an dismount better, i put a big time and with trigger i put to the hero only cast the ability if there is a unit of the type hippogryf around, what do you think about it ?
 
Level 2
Joined
Oct 31, 2007
Messages
17
goldentiger,
it wont make any difference if i send you the map, because the only thing there is in the map about that ability is the two abilities one for the hippogryf and one to the hero, i did some triggers but none of them gave right and i had no idea of waht to do, but if u want i could send u the map, you know, the map is playable already, that hero is only for atualizations, i did the map to pay with friends, and its portuguese because i am brazilian but if you want it i could send to you what do you think? want receive that ?
if yes answer me that i will send it to your e-mail thank u for the help man ^^
 
Level 2
Joined
Oct 31, 2007
Messages
17
if you prefer i send you the map
but if you can make the mount trigger and send me, i can give a look at it
it does not matter what way is better to you?

hey golden tiger
u don't need to do the trigger anymore,
i did it by myself
i used your idea of store the exp and the level with variables so i were capable to figure out a manner to make it create another unit when he used the ability and the other units disappear from game
thank you very much guy

how can i give you more rep ?
i am new around here and i don't understand how the rep system works

there is only one problem in the method i used, when the unit use the ability
the created hero, will have the abilities of the last hero, but he wont have them learned yet, he will have to distribute the skill points, can you think in a manner to cancel that ?

If yes it would be of much help
 
Last edited:
Level 2
Joined
Oct 31, 2007
Messages
17
actually
that´s not true golden tiger
i have created a manner to certificate if the hero has the ability, after that put the ability level of the same level of the ability that the hero has xD
thank you very much
but i have already done that ^^
and i haven´t used many variables.

hey golden tiger
one more thing
i have finished the ability if you want to see the code......
one thing, do you know how to post only the code in the forums ?
 
Level 2
Joined
Oct 31, 2007
Messages
17
lol kool then put it might run weird in multilayer games

why it must run weird in multiplayer games ?

The first
obs : the abilities in the if part are only for test
mount
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Pick up Archer
Actions
Set Xp = (Hero experience of (Casting unit))
Set Level = (Hero level of (Casting unit))
Wait 0.05 seconds
Unit - Remove (Casting unit) from the game
Unit - Create 1 Hypogriff for Player 1 (Red) at (Position of (Casting unit)) facing (Position of (Casting unit))
Selection - Select (Last created unit) for (Owner of (Last created unit))
Hero - Set (Last created unit) experience to Xp, Hide level-up graphics
Hero - Set (Last created unit) Hero-level to Level, Hide level-up graphics
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Acid Bomb for (Casting unit)) Greater than or equal to 1
Then - Actions
Hero - Learn skill for (Last created unit): Acid Bomb
Unit - Set level of Acid Bomb for (Last created unit) to (Level of Acid Bomb for (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Animate Dead for (Casting unit)) Greater than or equal to 1
Then - Actions
Hero - Learn skill for (Last created unit): Animate Dead
Unit - Set level of Animate Dead for (Last created unit) to (Level of Animate Dead for (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Banish for (Casting unit)) Greater than or equal to 1
Then - Actions
Hero - Learn skill for (Last created unit): Banish
Unit - Set level of Banish for (Last created unit) to (Level of Banish for (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Attribute Bonus for (Casting unit)) Greater than or equal to 1
Then - Actions
Hero - Learn skill for (Last created unit): Attribute Bonus
Unit - Set level of Attribute Bonus for (Last created unit) to (Level of Attribute Bonus for (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Pick up Archer for (Casting unit)) Greater than or equal to 1
Then - Actions
Unit - Add Dismount to (Last created unit)
Else - Actions
Do nothing

The second:

dismount
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Dismount
Actions
Set Xp = (Hero experience of (Casting unit))
Set Level = (Hero level of (Casting unit))
Wait 0.05 seconds
Unit - Remove (Casting unit) from the game
Unit - Create 1 Hippogryph for Player 1 (Red) at (Position of (Casting unit)) facing (Position of (Casting unit))
Unit - Create 1 Hypogriff Rider for Player 1 (Red) at (Position of (Casting unit)) facing (Position of (Casting unit))
Selection - Select (Last created unit) for (Owner of (Last created unit))
Hero - Set (Last created unit) experience to Xp, Hide level-up graphics
Hero - Set (Last created unit) Hero-level to Level, Hide level-up graphics
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Acid Bomb for (Casting unit)) Greater than or equal to 1
Then - Actions
Hero - Learn skill for (Last created unit): Acid Bomb
Unit - Set level of Acid Bomb for (Last created unit) to (Level of Acid Bomb for (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Animate Dead for (Casting unit)) Greater than or equal to 1
Then - Actions
Hero - Learn skill for (Last created unit): Animate Dead
Unit - Set level of Animate Dead for (Last created unit) to (Level of Animate Dead for (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Banish for (Casting unit)) Greater than or equal to 1
Then - Actions
Hero - Learn skill for (Last created unit): Banish
Unit - Set level of Banish for (Last created unit) to (Level of Banish for (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Hypogrifo (Rexxar) for (Casting unit)) Greater than or equal to 1
Then - Actions
Hero - Learn skill for (Last created unit): Hypogrifo (Rexxar)
Unit - Set level of Hypogrifo (Rexxar) for (Last created unit) to (Level of Hypogrifo (Rexxar) for (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Attribute Bonus for (Casting unit)) Greater than or equal to 1
Then - Actions
Hero - Learn skill for (Last created unit): Attribute Bonus
Unit - Set level of Attribute Bonus for (Last created unit) to (Level of Attribute Bonus for (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Pick up Archer for (Casting unit)) Greater than or equal to 1
Then - Actions
Unit - Add Dismount to (Last created unit)
Else - Actions
Do nothing

The third

give mount and dism
Events
Unit - A unit Starts the effect of an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Ability being cast) Equal to Hypogrifo (Rexxar)) and ((Unit-type of (Casting unit)) Equal to Hypogriff Rider)
Then - Actions
Unit - Add Pick up Archer to (Triggering unit)
Else - Actions
Do nothing

hope there are not many bugs ^^
 
Level 2
Joined
Oct 31, 2007
Messages
17
^^
i loved your message
only if various people use the spell
but only one person will be able to use it.
because there will be only one hero with that ability and that hero cant be bought more thaan one time
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
why it must run weird in multiplayer games ?

The first
obs : the abilities in the if part are only for test
mount
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Pick up Archer
Actions
Set Xp = (Hero experience of (Casting unit))
Set Level = (Hero level of (Casting unit))
Wait 0.05 seconds
Unit - Remove (Casting unit) from the game
//and so on

Please use trigger tags when you paste a trigger by writing [*trigger]Your copy paste trigger[*/trigger] Remove the * from both places and it will wrap itself to a trigger.
Ill do it for you this time...

  • mount
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pick up Archer
    • Actions
      • Set Xp = (Hero experience of (Casting unit)) //Don't use casting unit. You should rather use "triggering unit"
      • Set Level = (Hero level of (Casting unit)) //see above, replace this and further ones.
      • Wait 0.05 seconds //remove the wait... it can make next action bugged
      • Unit - Remove (Casting unit) from the game
      • Unit - Create 1 Hypogriff for Player 1 (Red) at (Position of (Casting unit)) facing (Position of (Casting unit))// this is leaking twice... see link to a "leak removal" tutorial at the end of this post.
      • Selection - Select (Last created unit) for (Owner of (Last created unit))
      • Hero - Set (Last created unit) experience to Xp, Hide level-up graphics
      • Hero - Set (Last created unit) Hero-level to Level, Hide level-up graphics
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Acid Bomb for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Hero - Learn skill for (Last created unit): Acid Bomb
          • Unit - Set level of Acid Bomb for (Last created unit) to ( Level of Acid Bomb for (Casting unit))
        • Else - Actions
          • Do nothing // Remove all Do Nothing... They are slowing the code down
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Animate Dead for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Hero - Learn skill for (Last created unit): Animate Dead
          • Unit - Set level of Animate Dead for (Last created unit) to (Level of Animate Dead for (Casting unit))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Banish for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Hero - Learn skill for (Last created unit): Banish
          • Unit - Set level of Banish for (Last created unit) to (Level of Banish for (Casting unit))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Attribute Bonus for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Hero - Learn skill for (Last created unit): Attribute Bonus
          • Unit - Set level of Attribute Bonus for (Last created unit) to (Level of Attribute Bonus for (Casting unit))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Pick up Archer for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Unit - Add Dismount to (Last created unit)
        • Else - Actions
          • Do nothing
The second:

  • dismount
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dismount
    • Actions
      • Set Xp = (Hero experience of (Casting unit))// do like I said before...
      • Set Level = (Hero level of (Casting unit))
      • Wait 0.05 seconds //remove it as well
      • Unit - Remove (Casting unit) from the game
      • Unit - Create 1 Hippogryph for Player 1 (Red) at (Position of (Casting unit)) facing (Position of (Casting unit))//location leak again
      • Unit - Create 1 Hypogriff Rider for Player 1 (Red) at (Position of (Casting unit)) facing (Position of (Casting unit))//same here
      • Selection - Select (Last created unit) for (Owner of (Last created unit))
      • Hero - Set (Last created unit) experience to Xp, Hide level-up graphics
      • Hero - Set (Last created unit) Hero-level to Level, Hide level-up graphics
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Acid Bomb for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Hero - Learn skill for (Last created unit): Acid Bomb
          • Unit - Set level of Acid Bomb for (Last created unit) to (Level of Acid Bomb for (Casting unit))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Animate Dead for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Hero - Learn skill for (Last created unit): Animate Dead
          • Unit - Set level of Animate Dead for (Last created unit) to (Level of Animate Dead for (Casting unit))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Banish for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Hero - Learn skill for (Last created unit): Banish
          • Unit - Set level of Banish for (Last created unit) to (Level of Banish for (Casting unit))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Hypogrifo (Rexxar) for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Hero - Learn skill for (Last created unit): Hypogrifo (Rexxar)
          • Unit - Set level of Hypogrifo (Rexxar) for (Last created unit) to (Level of Hypogrifo (Rexxar) for (Casting unit))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Attribute Bonus for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Hero - Learn skill for (Last created unit): Attribute Bonus
          • Unit - Set level of Attribute Bonus for (Last created unit) to (Level of Attribute Bonus for (Casting unit))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Pick up Archer for (Casting unit)) Greater than or equal to 1
        • Then - Actions
          • Unit - Add Dismount to (Last created unit)
        • Else - Actions
          • Do nothing
The third

  • give mount and dism
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Ability being cast) Equal to Hypogrifo (Rexxar)) and ((Unit-type of (Casting unit)) Equal to Hypogriff Rider)
        • Then - Actions
          • Unit - Add Pick up Archer to (Triggering unit)
        • Else - Actions
          • Do nothing
//

If you look at the code you see that I've helped you commenting actions which is not needed/or should be changed...

You should look at this tutorial to learn about leaks: http://www.hiveworkshop.com/forums/showthread.php?t=35124

I didnt really look if your trigger is working or not, Im just helping you preventing possible leaks.

/Regards
 
Level 2
Joined
Oct 31, 2007
Messages
17
Thank you Eccho i will give a look at it
and the trigger i already tested, its working i was only looking for bugs understand?
 
Status
Not open for further replies.
Top