• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

SPELLBOOK BUG WHEN UNCLOSED need help

Status
Not open for further replies.
Level 6
Joined
Feb 5, 2012
Messages
1,685
There is a bug where if your currently selected unit opens a spellbook then it dies and there is a trigger that force you to select another unit. That unit's command buttons as well as ALL THE OTHER BUTTONS WILL BE COMPLETELY BLACK, UNCLICKABLE AND UNUSABLE.

There is a fix but very annoying and for those who dont know how to fix it, it will cause a SEVERE PANIC.

Manually select other units then the bug will be removed.

What is the best solution to force the player to close the spell book before dying?

PLEASE DONT ANSWER ME SHOW THEM A WARNING ABOUT THIS BUG BECAUSE THERE A BRAINLESS PLAYERS WHO CAN'T UNDERSTAND THIS BUG AND HOW TO FIX IT BY THEMSELVES.
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
You can force a player to press the ESC buttong by using:

JASS:
call ForceUICancelBJ( Player(0) )

In GUI, you find this function in the category Game (ForceUI).

You have to get the moment, just before the unit dies and then force the player to press ESC by the mentioned function.
I am currently not sure, whether the event "A unit dies" fires right before or right after the actual "death action" of the unit. You should try it out though
 
Status
Not open for further replies.
Top