Does an alertbox stop the game at the moment it's triggered for sure? The thing I'm interested in is the following: Let's say I call a message in an EventHandler which is set to 'pre'. Does that prevent the event of happening until the alertbox is closed? And in that example, does a return STOP in the messagebox code stop the event?
Announcement
Collapse
No announcement yet.
Alertbox question
Collapse
X
-
I know where you are stuck at. I have been in a situation like yours before while doing the PBEM fix. But I really dont know the asnwer for it.
I just assumed that the asnwer was "no, it doesnt stop" without testing .
So i have managed a work around.
Still I would test it if i were you. But i believe the aswer really is no.
Here what i did to send proposal only after the consent of the player through alertbox:
Code:int_t CanSendProposal; HandleEvent(NewProposal) 'SaveProposalToPBEM' pre { if(CanSendProposal == 0) { message(player[0], 'PBEM_ProposalReady'); return STOP; } else{ CanSendProposal = 0; } } alertbox 'PBEM_ProposalReady' { Text(ID_WILL_YOU_SEND); Button(ID_YES){ CanSendProposal = 1; Event:NewProposal(player[0], player[1]); kill(); } Button(ID_NO){ kill(); } }
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
-
Unfortunatly the answer is no otherwise, the City Capture Option code what first ask you before the army enters the city, but before you can click anything the city is conquered. Maybe it could help to use the function: UseDirector() BUt from the discription I fear it is shown after the actual event.
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
Actually i was suspicious about that.
This thought was in my mind.
Yet, I cant figure out why the simulation of the effects of reformation like i did in the code needs change?"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Comment
-
Originally posted by mapfi
Actually it doesn't... as I later figured out.
Originally posted by mapfi
New question:
Can I tell the game what size the messagebox should have?
but messageboxes are bigger than alertbox though"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Comment
-
Originally posted by mapfi
I just seem to recall that somewhere I read that it's possible to change messagebox sizes - but I can't find anything now... Oh well
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
Re: Alertbox question
Originally posted by mapfi
Does an alertbox stop the game at the moment it's triggered for sure? The thing I'm interested in is the following: Let's say I call a message in an EventHandler which is set to 'pre'. Does that prevent the event of happening until the alertbox is closed? And in that example, does a return STOP in the messagebox code stop the event?
UseDirector is just keyed to the animation isn't it? The Function Reference file indications that this command is useful to time the triggering of the messagebox (won't work with alertboxes according to the docs) with the animation. So, it sounds like 'return STOP;' would be the best option here.
Any dvelopments you can share?
Comment
-
About messagebox size: 'Messagebox' messages have a fixed size, which IIRC is set in the ldl files. 'Alertbox' messages have a dynamic size: they are as large as they need to be, depending on the amount of text and buttons that they have (there *is* a limit on the max size though, which appears to be hardcoded).
Comment
Comment