• 🏆 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!

It does just not work, and I dont know why...

Status
Not open for further replies.
Level 3
Joined
May 5, 2013
Messages
56
What I am trying to do:
I want to produce a Hero (like in LoL: Jayce or Eylse, in Smite: Hel).

If you know any of these Heroes above, this information should not be new to you, anyway i will tell exactly what i want to do:
On Level 1 you lern a spell, with this spell you change your Hero Models and new Abilities. Therefore, I remove the Unit from the game, and create the new one (its an angel and a demon).
e.g.: I have the Angel currently, then, I activate the ability, and the model (the completely Hero) changes. The items I had before, The skill levels (Not made yet, upcoming) are kept, and because I dont know how to make cooldowns on abilities (because: even if the cooldown is e.g.: 20 sec, if the new hero is created, he has no cooldowns at all, thats why i tried to make the cooldown by: (cooldown = 5 sec)
  • Spieler - Deaktivieren Change Form for (Owner of (Casting unit))
  • Wait 5.00 game-time seconds
  • Spieler - Aktivieren Change Form for (Owner of (Casting unit))
But it does not work.


That is the Trigger that is not working:
1st Trigger (Demon to Angel)

(Event and Conditions are currently working, that is not the problem, so I didnt post them here)
  • Set AngelDemonGegenstand1 = (Item carried by (Casting unit) in slot 1)
  • Set AngelDemonGegenstand2 = (Item carried by (Casting unit) in slot 2)
  • Set AngelDemonGegenstand3 = (Item carried by (Casting unit) in slot 3)
  • Set AngelDemonGegenstand4 = (Item carried by (Casting unit) in slot 4)
  • Set AngelDemonGegenstand5 = (Item carried by (Casting unit) in slot 5)
  • Set AngelDemonGegenstand6 = (Item carried by (Casting unit) in slot 6)
  • Einheit - Remove (Casting unit) from the game
  • Einheit - Create 1 Angel for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
  • Einheitengruppe - Pick every unit in (Units in (Playable map area)) and do (Actions)
    • Schleifen - Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Unit-type of (Picked unit)) Gleich Angel
        • 'THEN'-Aktionen
          • Set CastingDemontoAngel = (Picked unit)
          • Held - Set (Picked unit) experience to AngelDemonHeroXP, Verbergen level-up graphics
          • Held - Give AngelDemonGegenstand1 to (Picked unit)
          • Held - Give AngelDemonGegenstand2 to (Picked unit)
          • Held - Give AngelDemonGegenstand3 to (Picked unit)
          • Held - Give AngelDemonGegenstand4 to (Picked unit)
          • Held - Give AngelDemonGegenstand5 to (Picked unit)
          • Held - Give AngelDemonGegenstand6 to (Picked unit)
          • Auswahl - Select (Picked unit) for (Owner of (Picked unit))
        • 'ELSE'-Aktionen
          • Do nothing
  • Spieler - Deaktivieren Change Form for (Owner of (Casting unit))
  • Wait 5.00 game-time seconds
  • Spieler - Aktivieren Change Form for (Owner of (Casting unit))
  • Held - Learn skill for CastingDemontoAngel: Change Form
  • Set CastingDemontoAngel = Keine Einheit



And here is of course the Trigger when I want to change from Angel to Demon:
2nd Trigger (Angel to Demon)

  • Set AngelDemonGegenstand1 = (Item carried by (Casting unit) in slot 1)
  • Set AngelDemonGegenstand2 = (Item carried by (Casting unit) in slot 2)
  • Set AngelDemonGegenstand3 = (Item carried by (Casting unit) in slot 3)
  • Set AngelDemonGegenstand4 = (Item carried by (Casting unit) in slot 4)
  • Set AngelDemonGegenstand5 = (Item carried by (Casting unit) in slot 5)
  • Set AngelDemonGegenstand6 = (Item carried by (Casting unit) in slot 6)
  • Einheit - Remove (Casting unit) from the game
  • Einheit - Create 1 Demon for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
  • Einheitengruppe - Pick every unit in (Units in (Playable map area)) and do (Actions)
    • Schleifen - Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Unit-type of (Picked unit)) Gleich Demon
        • 'THEN'-Aktionen
          • Set ChangeFormPickedUnit = (Picked unit)
          • Held - Set (Picked unit) experience to AngelDemonHeroXP, Verbergen level-up graphics
          • Held - Give AngelDemonGegenstand1 to (Picked unit)
          • Held - Give AngelDemonGegenstand2 to (Picked unit)
          • Held - Give AngelDemonGegenstand3 to (Picked unit)
          • Held - Give AngelDemonGegenstand4 to (Picked unit)
          • Held - Give AngelDemonGegenstand5 to (Picked unit)
          • Held - Give AngelDemonGegenstand6 to (Picked unit)
          • Auswahl - Select (Picked unit) for (Owner of (Picked unit))
        • 'ELSE'-Aktionen
          • Do nothing
  • Spieler - Deaktivieren Change Form for (Owner of ChangeFormPickedUnit)
  • Wait 5.00 game-time seconds
  • Spieler - Aktivieren Change Form for (Owner of ChangeFormPickedUnit)
  • Held - Learn skill for ChangeFormPickedUnit: Change Form
  • Set ChangeFormPickedUnit = Keine Einheit



That is enough of what I want to do. Here is my Problem in Detail:

When I change from Angel to Demon (running the 2nd Trigger), everything works as is should. Items kept, the spell "Change Form" is learned by the hero, as it should be.
But if I change from Demon to Angel (running the 1st Trigger) The spell is not skilled. With Items I also have problems (I come to that later) but i fixed them on my own way.
But the real Problem is that the Spell is not skilled. It should automatically upgrade to lvl 1 and should be learned right away. But it doesnt.
And now it gets interesting:
It is all because of this:
  • Wait 5.00 game-time seconds
If I turn off this Trigger (only the wait 5.00 Part), it works perfectly as it should. But if I force him to wait for 5 sec, the spell is learnable after 0 seconds and the Hero does not learn it when the 5 sec are up (normally he should not be ready until the 5 sec are over, because I want this spell to have a 5 sec "cooldown")


please help me, I dont know what I should do, tested everything... Would be great if this finally works, thank you...
 
Level 23
Joined
Oct 20, 2012
Messages
3,075
I don't really like reading a lot of trigger actions and walls of text but It looks like you're morphing the hero into another without the duration.. So you could use Tinker's Robo-Goblin ability..

EDIT: Remove the Do Nothings.. They do nothing an only make your trigger slow.
Wait also makes your trigger not MUI.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
change the casting unit to triggering unit whenever u use it. always use triggering unit.
using casting unit after a wait is most likely the cause of it not working.

whenever u use something twice or more store it into a temp variable as a temp variable is faster and more efficient.

u have point leaks. u should clean them up or ur map will lag and become unplayable

fix all of these and ur trigger should work

also take a look at my tutorial it has a ton of usefull info for GUIers. http://www.hiveworkshop.com/forums/tutorial-submission-283/things-gui-user-should-know-233242/

here is a tutorial on leak removal also http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

next time post the whole trigger.
 
Level 3
Joined
May 5, 2013
Messages
56
yeah sry guys, I totally forgot that my World Editor was in German...

thank you for your help, i will try tinker ability to transform maybe it will work better...

anyway you helped me a lot everyone, so thanks
 
Level 3
Joined
May 5, 2013
Messages
56
By the way, I think I was maybe interpreted wrong...

If this Unit Transofrms, it becomes NEW abilities...

e.g.:
SHadow Form has the Abilities: Ability 1, Ability 2, Ability 3...
If you transform into Angel Form, it has the Abilities: 4, 5, 6

But I can simply do this by Trigger, right?
(I mean like set Ability for Unit = xy)
 
Level 9
Joined
Nov 19, 2011
Messages
516
By the way, I think I was maybe interpreted wrong...

If this Unit Transofrms, it becomes NEW abilities...

e.g.:
SHadow Form has the Abilities: Ability 1, Ability 2, Ability 3...
If you transform into Angel Form, it has the Abilities: 4, 5, 6

But I can simply do this by Trigger, right?
(I mean like set Ability for Unit = xy)

New hero can have different abilities. It just must be associated with old one in skill data.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
So you want to switch between Heroes, the only difference is that the model is changed and the skill set is changed, right ?
And those skill set (original) level must be applied same level with skill set (switch) level, like in first skill (original) is at level 3, then the first skill (switch) must also be level 3, right ?
 
Level 3
Joined
May 5, 2013
Messages
56
So you want to switch between Heroes, the only difference is that the model is changed and the skill set is changed, right ?
And those skill set (original) level must be applied same level with skill set (switch) level, like in first skill (original) is at level 3, then the first skill (switch) must also be level 3, right ?

Exactly. That is what I want to achieve. And I dont think that Tinker Ability does that, due to it only changes model...
 
Level 3
Joined
May 5, 2013
Messages
56
redteal, you tried the map I attached?

Ah yes, now i did. That is excatly what i was looking for, thats dude. I now import this on my own map.

Thanks everyone for helping, i guess the problem is now solved.

And sry again for double posting and making the triggers not english (I'm completely new to Hive Workshop).

If anything else does not work as it should, i will let you know.
 
Status
Not open for further replies.
Top