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

[Trigger] Close a Spellbook

Status
Not open for further replies.
Level 7
Joined
Mar 24, 2008
Messages
184
Not sure if this is the right forum but...
So, i have this morphing spell in a spellbook, and it triggers this:

  • Actions
    • Set ShapeshiftCaster = (Triggering unit)
    • Unit - Hide ShapeshiftCaster
    • Unit - Turn collision for ShapeshiftCaster No
    • Unit - Set the custom value of ShapeshiftCaster to (Player number of (Owner of (Triggering unit)))
    • Unit - Change ownership of ShapeshiftCaster to Neutral-passive and Keep the color
    • Unit - Pause ShapeshiftCaster
    • Unit - Make ShapeshiftCaster Invulnerable
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Ability being cast) Equals to Water Elemental (Druid)
      • Then - Actions
        • Unit - Create 1 Druid (Elemental) for (Triggering player) at (Position of ShapeshiftCaster) facing (Facing of ShapeshiftCaster) degrees
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Ability being cast) Equals to Wolf (Druid)
          • Then - Actions
            • Unit*- Create 1 Druid (Wolf) for (Triggering player) at (Position of ShapeshiftCaster) facing (Facing of ShapeshiftCaster) degrees
          • Else - Actions
            • Unit - Create 1 Druid (Dragon) for (Triggering player) at (Position of ShapeshiftCaster) facing (Facing of ShapeshiftCaster) degrees
    • Set ShapeshiftSummoned = (Last created unit)
    • Hero - Set ShapeshiftSummoned experience to (Hero experience of ShapeshiftCaster), Hide level-up graphics
    • Hero - Modify Strenght of ShapeshiftSummoned: Imposta (Strenght of ShapeshiftCaster (Exclude bonuses))
    • Hero - Modify Agility* of ShapeshiftSummoned: Imposta (Agility* of ShapeshiftCaster (Exclude bonuses))
    • Hero - Modify Intellect of ShapeshiftSummoned: Imposta (Intellect of ShapeshiftCaster (Exclude bonuses))
    • For each (Integer A) from 1 to 6, do (Actions)
      • Loop - Actions
        • Hero - Give (Item carried by ShapeshiftCaster in slot (Integer A)) to ShapeshiftSummoned
    • Selection - Add ShapeshiftSummoned to selection for (Triggering player)
    • Unit - Set life of ShapeshiftSummoned to (Percentage life of ShapeshiftCaster)%
    • Unit - Set mana of ShapeshiftSummoned to (Percentage mana of ShapeshiftCaster)%
(sorry if some words may look strange, i've translated triggers from italian)
so, as i said, theese spells are in a spellbook, but when the unit is replaced i have a problem, the spellbook is kept open
I had to give an empty spellbook to the units so it could be closed by clicking on the "cancel" button. Before that, when the unit was changed (and had no empty spellbook), it had no buttons in the buttons bar, though they reappeared when i deselected the unit and selected it again.
Is there any solution to this?
 
Level 7
Joined
Mar 24, 2008
Messages
184
I dun't really understand your problem...But you can always close a spell book by trigger, select unit, force player to press esc.

Duh...i've made several posts because i needed events or actions i couldn't find though i was sure i checked everything...i've always knew about the force UI key action, but never noticed the force UI cancel (though it was just under it)
Wanna laugh? my first attempt at closing a spellbook was to write ESC in the "force UI key" string :hohum:
 
Last edited:
Status
Not open for further replies.
Top