HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Defeat message

12-11-2003, 04:52 PM#1
Voi
Can I change the message all other get when u die. I guess it is "%s was defeated" now. I cant find it in gameplay interface. Can I do it with JASS? Im not good at JASS but if so, how to do exactly. The biggest reason is because I use the defeat triggers for win too. That's because I want a win message.
12-11-2003, 05:32 PM#2
Silver_Lynx
Create your own defeat function.

I'm guessing you have some sort of trigger that says

E - player loses (whatever causes him to lose)
A - show player defeat to (triggering player)

Instead, do something like this

E - Player loses
A - Game display to (whoever you want): "whatever you want"


Then you can pause, or kill all the units owned by the player. Or whatever you wish. If you're referring to the message it gives other players when you die, then you can now make up your own.
Have the real defeat message shown after everybody has either lost or won.
12-11-2003, 05:50 PM#3
Voi
Yes but u forgot the hard thing! If I make him lose how do I show that window with the quit button and the whatever-u-want text?
12-13-2003, 08:05 AM#4
Voi
Isnt it possible to make a defeat with JASS and then change the msg?
12-13-2003, 11:49 AM#5
AllPainful
There is a GUI trigger for the defeat message....

Its under "Game"

Here is an example of a defeat trigger:

Code:
Defeat
    Events
        Player - Player 1 (Red)'s Food used becomes Equal to 0.00
    Conditions
    Actions
        Game - Defeat Player 1 (Red) with the message: Your Message here
        Custom script:   call EnableUserUI(true)

That will show the normal "Defeat" window with the "Quit" buttons and stuff, but instead of saying "Defeat!" it will say what ever you put where I have "Your Message Here".

The "Custom script: call EnableUserUI(true)" you MUST have in there, otherwise all other players will lose their UI. There is a bug that when one player is defeated all the other players lose their UI, that command will re-enable the UI.
12-13-2003, 12:01 PM#6
Dead-Inside
OH GOD I LOVE YOU ALLPAINFUL!!!

Sorry I never go beserk like that... But I actually didn't know there was a way to fix the "defeat bug". Shouldn't this be added in to the UMSWE editor? Such that you don't have to do it yourself?

Anyway, back on topic, Voi,

Did you want it to say how many players are left, how many % has lost the game, or what did you want? Tell me again and I'll type it up.

Regards
Dead-Inside
12-13-2003, 12:15 PM#7
AllPainful
Dead-Inside, I didn't know about the fix until just the other day. Someone posted it on this very forum...

Voi - The message "%s was defeated" automatically appears to all other players when you use the GUI defeat action above, and if you want to change the message it in the advanced menu, edit the User Interface.
12-14-2003, 12:45 AM#8
Voi
I cant find it in unit interface and yes, thats what I asked for. I dont need to re-enable UI because all lose/win at the same time but u still see the msg. THe real reason to why I want it like that is because I wanna use defeat when u win too and then it stands "was defeated".
12-14-2003, 01:08 AM#9
AllPainful
User Interface not unit interface. ;) (just kidding)

Hold on, let me look for it...

Advanced -> Game Interface....

Hmmm... Maybe I was wrong, the closest thing I could find was:

%s was defeated by %s.....



Question, if all the players Win or Lose at the same time, then Why are you trying to edit that message, no one will see it!

The message that appears on the "You Lose" window is the one you can edit in the trigger above.

BTW, to find the action for the lose in the trigger above, its "Game - Defeat".
12-14-2003, 03:42 AM#10
Swamp(KZ)
Are you able to make a picture for the defeat message?
12-14-2003, 05:30 AM#11
AllPainful
Swamp(KZ)

In the message = No I don't think so.

As a background for the message = Yes, but it will change the BG for all the menus. "Image - Game menu background" in game interface.

On the Score screen banner = Yes "Image - Score screen banner - loss" in Game Interface

The score screen background = Yes "Model - Score screen victory" in game interface