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

[Spell] Robo-goblin problem

Status
Not open for further replies.
Level 2
Joined
Oct 22, 2011
Messages
14
Hi. I am new to world editor

I wanted to use an ability that turned my hero into another unit with different abilities and attributes.

I've seen a guy doing this with the ability robo-goblin

I did the same as he did and I could switch between the 2 forms. I also noticed that the second form of robo-goblin is not a hero but a unit so the 2nd form abilities can't be hero abilities.

However, whenever I change my hero to the second form, the hero abilities that should disappear don't and are hiding the 2nd form abilities that would be in the same position in the spellbook.

Do you know how to solve this?
 
Level 2
Joined
Oct 22, 2011
Messages
14
I could solve partially the problem.

I used the trigger:
Event - unit starts the effect of an ability
Condition - ability being cast equal to <Morph>
Action - disable ability X


However I can't solve it in the opposite direction. What I mean by that is that when my Morph ends, I want to enable the ability X again. But I don't know which trigger does that. What I know is that "finishes casting an ability" doesn't work.

Any ideas? The Morph spell has a timeout
 
Level 2
Joined
Oct 22, 2011
Messages
14
Check if the Base Order Id of the two spell books (owned by the Hero and his form) are not the same.
That could make the spells collide

Where can I see those IDs?

The only thing I changed was the Ability List in each Unit. And they don't have any ID I think
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Spellbooks data have an "Base Order ID" Field. If two spellbooks have the same ID; it's like they're one. Change one of those. I'm not sure if it's "Base order ID" or "Spell ID" or something like that. but It's an "ID" xD
 
Level 2
Joined
Oct 22, 2011
Messages
14
Oh I see why I was confused with these answers. I don't use spellbooks. I used the word spellbook in my first comment but I wanted to say the place where my abilities can be selected while using my hero...

Hmm... I don't want to use spellbooks because I don't want to have to open them while playing
 
Level 12
Joined
Oct 16, 2010
Messages
680
I could solve partially the problem.

I used the trigger:
Event - unit starts the effect of an ability
Condition - ability being cast equal to <Morph>
Action - disable ability X


However I can't solve it in the opposite direction. What I mean by that is that when my Morph ends, I want to enable the ability X again. But I don't know which trigger does that. What I know is that "finishes casting an ability" doesn't work.

Any ideas? The Morph spell has a timeout

To make this in back ward , create another trigger whit a timer expiring event
that makes the reverse of this
create a timer that expires in the same time like your morph does
so than it will do what the second trigger contains
 
Level 2
Joined
Oct 22, 2011
Messages
14
To make this in back ward , create another trigger whit a timer expiring event
that makes the reverse of this
create a timer that expires in the same time like your morph does
so than it will do what the second trigger contains

Yeah... I tought about that. I was just wondering if there was another way so that if I change the duration of the spell in one place, it would affect the other. In other words, I was wondering if there was a "clean" way of doing that

But, I will try that now.
 
Level 2
Joined
Oct 22, 2011
Messages
14
To make this in back ward , create another trigger whit a timer expiring event
that makes the reverse of this
create a timer that expires in the same time like your morph does
so than it will do what the second trigger contains

This world editor is very strange. If I use as actions:
- Disable Ability X
- wait Y seconds
- Enable Ability X

I chose an Y<duration of morph to test the trigger

What happens is, after I morphed, the ability X disappears (which is good) and appears after Y seconds. However when I am back to my normal form the ability X disappears again and only appears after Y seconds. Which means that the actions are affecting both forms seperately
 
Level 2
Joined
Oct 22, 2011
Messages
14
The robo-goblin I created has a duration of 40 sec and my current trigger is:

Event: A unit starts the effect of an ability
Condition: (Ability being cast) equal to Morph
Action:
- Player - Disable X for (triggering player)
- Wait 10 sec
- Player - Enable X for (triggering player)
 
Level 2
Joined
Oct 22, 2011
Messages
14
The robo-goblin I created has a duration of 40 sec and my current trigger is:

Event: A unit starts the effect of an ability
Condition: (Ability being cast) equal to Morph
Action:
- Player - Disable X for (triggering player)
- Wait 10 sec
- Player - Enable X for (triggering player)

The effect of this trigger is:
Player morphs
Player doesn't have the ability X
10 secs...
Player has the ability X again
Player goes back to normal form
Player doesn't have the ability X
10 secs...
Player has the ability X again
 
Level 2
Joined
Oct 22, 2011
Messages
14
The effect of this trigger is:
Player morphs
Player doesn't have the ability X
10 secs...
Player has the ability X again
Player goes back to normal form
Player doesn't have the ability X
10 secs...
Player has the ability X again

And what I want is just
Player morphs
Player doesn't have the ability X
10 secs...
Player has the ability X again
Player goes back to normal form
 
Level 12
Joined
Oct 16, 2010
Messages
680
Probably the forming back to normal fires the event too
not sure about that

u have only one trigger now?

and it doesn't make much sense to wait for 10 sec as far your morphing lasts for 40
if its true that i think the event was fired twice than delete the waits and try it with if then else

if *type of unit* == *normal form* then disable ability x
else if *type of unit* == *formed* then enable ability x

cus i think forming and forming back uses the same order Id of that spell
that is the reason i think it fires the event twice
 
Level 2
Joined
Oct 22, 2011
Messages
14
Probably the forming back to normal fires the event too
not sure about that

u have only one trigger now?

and it doesn't make much sense to wait for 10 sec as far your morphing lasts for 40
if its true that i think the event was fired twice than delete the waits and try it with if then else

if *type of unit* == *normal form* then disable ability x
else if *type of unit* == *formed* then enable ability x

cus i think forming and forming back uses the same order Id of that spell
that is the reason i think it fires the event twice

I tried that after my last post. Doesn't work. The trigger has the same effect twice not because the morph ability acts twice but because the trigger affects both forms.
 
Level 2
Joined
Oct 22, 2011
Messages
14
yea, but it is because u disable the ability not for the unit but for a player
and as i said try the if then else like i mentioned

or if u have already done i'll check it what should u do

do u still using robo-goblin?

Yes I still use a skill based in robo-goblin

When it comes to the condition I am having problems too. My heros aren't in the default tool palette. To select them in the map I select them in Object Editor and choose "Select in Tool Palette".

I started by using the condition type: Unit Comparison. But it doesn't work for a specific type of hero but for a specific unit

So I tried to use: Unit-type comparison. However, when I try to select a type of unit the default tool palette appears in the same window without the hero I want. But the "Select in Tool Palette" doesn't work here.

How can I select my hero in the unit-type comparison?
 
Level 12
Joined
Oct 16, 2010
Messages
680
Well i don't know what u are trying to do but this is worked for me...
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Robo-Goblin
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to (==) Tinker
        • Then - Actions
          • Player - Disable Acid Bomb for (Owner of (Triggering unit))
          • Player - Disable Blink for (Owner of (Triggering unit))
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to (==) Beastmaster
        • Then - Actions
          • Player - Enable Acid Bomb for (Owner of (Triggering unit))
          • Player - Enable Blink for (Owner of (Triggering unit))
        • Else - Actions
added the abil "acid bomb" and "blink" to tinker rexarr is the form
and i've given him the "bloodlust" and one of my custom normal unit spells
swithced between the two with no problem
 
Level 2
Joined
Oct 22, 2011
Messages
14
u have to roll from melee to custom and for the race your unit is
there u should be find it

Facepalm

It worked now.

I use:
eff: unit starts ability
cond: ability equal to morph
action:
- disable
- wait 4 sec (It takes time to transform)
- wait until unit not equal to "2nd form"
- enable

Finally.
 
Level 2
Joined
Oct 22, 2011
Messages
14
Well i don't know what u are trying to do but this is worked for me...
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Robo-Goblin
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to (==) Tinker
        • Then - Actions
          • Player - Disable Acid Bomb for (Owner of (Triggering unit))
          • Player - Disable Blink for (Owner of (Triggering unit))
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to (==) Beastmaster
        • Then - Actions
          • Player - Enable Acid Bomb for (Owner of (Triggering unit))
          • Player - Enable Blink for (Owner of (Triggering unit))
        • Else - Actions
added the abil "acid bomb" and "blink" to tinker rexarr is the form
and i've given him the "bloodlust" and one of my custom normal unit spells
swithced between the two with no problem

I haven't read your whole answer, but it seems to be better than mine. Thanks!

I am really a noob using this world editor. My programming skills are very weak :S
 
Status
Not open for further replies.
Top