| 10-05-2008, 09:55 AM | #2 |
The user pressing Escape can be detected with the the playerevent EVENT_PLAYER_END_CINEMATIC. |
| 10-05-2008, 02:25 PM | #3 |
Or in GUI; A player skips a cinematic sequence |
| 10-05-2008, 08:20 PM | #4 |
Thanks for the quick replies. That works great when the user actually presses the <Esc> key, but I still don't know of a way to determine when the user clicks the cancel button. Is there a way to determine button click events? or some other workaround? Also, there is still a problem with the morph ability that causes the amount of mana to change. Is there a way to fix it so that the unit has the proper amount of mana before, during, and after being morphed? |
| 10-05-2008, 10:01 PM | #5 |
Yeah, but it requires you to run a very fast periodic trigger that forces the player controlling the unit to press a UI key, such has K. In the Object Editor, you'll need to create an instant-cast ability with the same key as its hotkey (in this case K). When the player switches to the advanced build menu, add the ability to the unit, and when he does anything other than cancel, remove the ability. The final thing you must do is detect when the unit is ordered the orderid of the ability you created (so if you based it on Roar, check for "roar"). If a unit is ordered this order and is of the proper type, then you know that the unit is an advanced builder that a player has just pressed the cancel button. |
| 10-06-2008, 04:22 AM | #6 |
Thanks Pyro, that worked great. The reason that the mana was getting messed up was because I was adjusting the maximum mana of the units in game, this causes wierd issues with morph. After trying everything I could think of, I completely re-did the way in which I deal with mana (map specific) so that it would work properly. Thanks, -Xeno |
| 10-06-2008, 05:05 AM | #7 |
Sure thing. I'm surprised you deciphered what it is you needed to do from my post. Something that complex usually takes a more detailed explanation xD. |
