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

Disable Echap key

Status
Not open for further replies.
Level 3
Joined
Dec 2, 2013
Messages
25
Hi my lords, is there a way to disable the echap key ?

I use many custom cinematic with images that I drew myself + custom text, and for some of them, I really need to disable the echap key in order to prevent the skip possibilities, I know that it could be a bad thing (speed run or multpiple playthough) but, for now, it will break the game if a player skip a cinematic...

Thank you by advance !

Shrrignien
 
Level 3
Joined
Dec 2, 2013
Messages
25
I fixed every problems like this :
1) use custom script at the map initialization
Custom script : call TryInitCinematicBehaviorBJ()
Custom script : call DisableTrigger(bj_cineSceneBeingSkipped)

2) For each cinematic, create a dummy unit with expiration timer equal to your cinematic duration (example 30s).

3) When this dummy die, if you want to send another transmission, then recreate another dummy with expiration timer + the next transmission, or let it go (turn off cinematic/letterbox...) if you need only 1 transmission.

4) The trigger, "a player skip cinematic" still detect the "echap" key, so we can use the dedicated trigger to detect if a player wants to skip a cinematic. in this case, we just have to kill the dummy cinematic unit that we created before, if there is another transmission after, it will continue, if not, the cinematic mode will be turned off automatically.


it is a really quick explanation, but with this system, i can have different cinematic at the same time for MULTIPLE PLAYERS, and each one can skip its own cinematic WITHOUT SKIPPING OTHERS PLAYERS ones.

I hope, this may give some clues for those in trouble like me.
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
I'm sure the Dummy solution works fine, but this should really be done with standard Timers. They're the same exact thing as an Expiration Timer but without the need of a Unit to be created/killed. Since your solution works I wouldn't worry about changing your triggers, I just wouldn't recommend it to others since there's an objectively better method.

Also, most people on here will be confused by "Echap" key, I know I was :p
 
Level 3
Joined
Dec 2, 2013
Messages
25
I used timer long time ago, but dummies give me more flexibilities : I can attach specials effect, abilties in order to do various things with them, all my timers are specific units now. Timers are usefull yes but I'm not 100% confident with them, and I have always found them buggy and unreliable for my use...

I suspect that it's my use which is not the good one, but I have taken the habit of doing without for a long time now.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
Well, if you make good use of them for other things then I don't see an issue. I just wanted to make sure that you weren't making things harder for yourself.

I know Timers in GUI are pretty awful to work with, they must be global variables and their arrays require defined Sizes and lack proper detection for which Timer expired. That being said, if you use a GUI Timer System that takes advantage of local timers created in Jass, you can get a lot more use out of them. Although, at that point it's probably more bloat/extra steps than just using a Dummy unit...
 
Status
Not open for further replies.
Top