I've seen other custom games implement this and I can't quite figure out how to do it. I've tried searching but to no avail. Can anyone help me out?
When the player's CC dies I want a box to come up that gives them the option to leave the game or continue as an observer.
Thanks.
create dialog, show dialog for (triggering player), set variable Dialog[(triggering player)] == (last created dialog), create dialog item (button) for (last created dialog), set variable Dialog Item[1][(triggering player)] == (last created dialog item), create dialog item (button) for (last created dialog), set variable Dialog Item[2][(triggering player)] == (last created dialog item)
event- Dialog item used
conditions- used dialog item == dialog item[1][(triggering player)]
actions- end game in defeat for (triggering player) (show dialogs, show score screen), destroy dialog Dialog[(triggering player)]
event- Dialog item used
conditions- used dialog item == dialog item[2][(triggering player)]
destroy dialog Dialog[(triggering player)], create visibility revealer for player (triggering player) within (Entire Map)
This is assuming your game ends by killing off all of the units, if not ,you need a unit group action to kill all of the units owned by the player.
I've seen other custom games implement this and I can't quite figure out how to do it. I've tried searching but to no avail. Can anyone help me out? When the player's CC dies I want a box to come up that gives them the option to leave the game or continue as an observer. Thanks.
Are you having trouble making the dialog box or making the player an observer?
@BasharTeg: Go
Sorry I was away. The dialog box.
@torquate: Go actions are separated by commas.
create dialog, show dialog for (triggering player), set variable Dialog[(triggering player)] == (last created dialog), create dialog item (button) for (last created dialog), set variable Dialog Item[1][(triggering player)] == (last created dialog item), create dialog item (button) for (last created dialog), set variable Dialog Item[2][(triggering player)] == (last created dialog item)
event- Dialog item used
conditions- used dialog item == dialog item[1][(triggering player)]
actions- end game in defeat for (triggering player) (show dialogs, show score screen), destroy dialog Dialog[(triggering player)]
event- Dialog item used
conditions- used dialog item == dialog item[2][(triggering player)]
destroy dialog Dialog[(triggering player)], create visibility revealer for player (triggering player) within (Entire Map)
This is assuming your game ends by killing off all of the units, if not ,you need a unit group action to kill all of the units owned by the player.