• 🏆 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's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ordering a unit to cast a Spellbook spell?

Status
Not open for further replies.
Level 9
Joined
Apr 20, 2008
Messages
125
I've been fooling around with the Spellbook ability, and I have been able to hide the Spellbook ability completely, of course, by disabling it through triggers. I know that if you have a disabled Spellbook, the passive spells within it will still work. However, when I have an active ability (such as Slam) inside of a disabled Spellbook, I have been thusfar unable to order the unit to cast the active ability via triggers. I think that it may be because it is impossible to Order a unit to use a Spellbook ability through triggers, but if someone could enlighten me on how I might be able to do so, that would be excellent.

Thank you in advance!
 
Level 7
Joined
Jan 18, 2007
Messages
180
  • Actions
    • Selection - Select (Triggering unit) for Player 1 (Red)
    • Game - Force Player 1 (Red) to press the key A
    • Game - Force Player 1 (Red) to press the key B
A is the hotkey for the Spellbook and B is the hotkey for the ability in the Spellbook.

I don't know this will work for sure.
 
Level 5
Joined
Aug 27, 2007
Messages
138
Spellbook abilities have an orderid. If you cause the unit with the spellbook to perform an order of the spellbook's ID, it will open it, then you can access the spellbook's abilities via another order.

...I think. That's how it should work.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
You cannot open a disabled spellbook - it's disabled.
You cannot use the spells in a spellbook if it is disabled. Only passive's.
P.s. When you are using disabled spellbooks to add spells, that is a different story.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
When you are gonna use a spell
enable spell book
order to cast spell
disable spell book

it should work I guess
 
Level 9
Joined
Apr 20, 2008
Messages
125
I decided to test some of these ideas out, first by not disabling the spellbook in the first place so I could see what happens.

I changed the Spellbook's orderid to Roar. Inside of the spellbook is Warstomp. I created a trigger that ordered my hero to cast Roar (So that it might open up the Spellbook), and then cast Warstomp. However, when the appropriate action occurs that should order my Hero to open the spellbook, the spellbook icon "lights up" as if a player had activated/clicked on the icon, but then doesn't open, and Warstomp is never cast.

If it helps, I'm trying to create a "Blink-Stomp" ability, one that will have the hero emit a Warstomp effect once they teleport to whatever location the player clicks via blink. I.e., the trigger looks like this:

Event
Unit finishes casting an ability

Condition
Ability being cast is equal to Blink

Actions
Order Unit to cast Night Elf Druid of the Claw - Roar
Order Unit to cast Orc Tauren Chieftan - Warstomp

EDIT: I also attempted to use a "dummy caster" to perform the same effect, by creating the dummy caster at the hero's location whenever the hero finishes casting Blink, but that does not seem to work either. I believe I created the caster and trigger correctly, because whenever the hero finishes Blink, the ground warps slightly, as it would if Warstomp were cast, but there is no other Warstomp animation, no damage is caused, and no stun is given to enemies.

EDIT 2: I solved the problem. Turns out the targets weren't taking damage or being stunned because they were elementals. /headdesk. I went with the Dummy Caster solution, and now it works fine. Thank you for suggestions, however!
 
Last edited:
Status
Not open for further replies.
Top