How would I make an action occur when a Check Box is checked. I am familar with Dialogs and have created Dialogs and assigned a variable to the check box which is "ChkBxPlayer3Yes" and have done the following:
-x-x-x-x-x-x-
if
(Used Dialog item) == ChkBxPlayer3Yes
then
Dialog - Disable ChkBxPlayer3Yes for (All players)
-x-x-x-x-x-x-
much more but this is what is bothering me. I can't get an action to occur with this check box, I can if its a button, is there no way to create an action when a Check Box is used?
Like I said I have done that already. Here let me show you some pictures.
Picture 1 (show1) is a dialog called from another dialog.
Picture 3 (show3) is trying to modify the dialog set up in show1 when a check box is shown. (I tried two differenet ways to get the triggers to recognize a check box is being used, I showed one in the first if and one in the second if).
PLEASE DO NOT STEAL THIS CODE. I PLAN TO RELEASE IT WHEN FINISHED BUT UNTIL THEN I DONT WANT SOMEONE RELEASING IT BEFORE ME! Please be kind.
Who'd want to steal a small piece of simple code which doesn't even work?:D
Anyway, you can't use (Triggering Player) in the event.
Switch it to (Any Player) or to a certain player. But (Triggering Player) is a so-called Event-response. It can be used in actions, as a response to the event that triggered the trigger.
Not suprisingly your simple fix didn't work. Triggering player worked all the other times I used it to display Dialogs, but just for the sake of it I tried setting it to anyplayer and it didn't work my friend.
Alright, so what exactly doesn't work? Both of the triggers shown or only the right one?
Also, try adding a new action to the trigger(s) that don't work. A simple action like Display Text Message, just to see whether the error lies in the Event/Condition or the Actions.
PS: Also, when you use a checkbox you probably have to change
Dialog - Any Dialog Item is Clicked by Player Any Player
to
Dialog - Any Dialog Item is Checked by Player Any Player
Sorry I wasn't clear the first code worked perfeclty, the second did not. But it was your final suggestion (clicked to checked) that fixed it, thanks for finding my oversight.
I have been investigating the thing with using Triggering Player in the event, by the way and it's quite funny:
The value of Any Player is -1, so giving -1 to the event as a parameter will have the same effect.
Since Triggering Player is invalid when used in events it returns an error code, which is, coincidentally also -1 (that's a normal thing to do in programming when you're using the 0 already).
So it only works because it isn't supposed to work :]
How would I make an action occur when a Check Box is checked. I am familar with Dialogs and have created Dialogs and assigned a variable to the check box which is "ChkBxPlayer3Yes" and have done the following:
-x-x-x-x-x-x-
if
(Used Dialog item) == ChkBxPlayer3Yes
then
Dialog - Disable ChkBxPlayer3Yes for (All players)
-x-x-x-x-x-x-
much more but this is what is bothering me. I can't get an action to occur with this check box, I can if its a button, is there no way to create an action when a Check Box is used?
use as trigger:
ofc you can specific what check box etc and by what player
if you can't figure it out. send me a PM with the details and I will make you an example
@Jackolas: Go
Like I said I have done that already. Here let me show you some pictures.
Picture 1 (show1) is a dialog called from another dialog. Picture 3 (show3) is trying to modify the dialog set up in show1 when a check box is shown. (I tried two differenet ways to get the triggers to recognize a check box is being used, I showed one in the first if and one in the second if).
Who'd want to steal a small piece of simple code which doesn't even work? :D
Anyway, you can't use (Triggering Player) in the event.
Switch it to (Any Player) or to a certain player. But (Triggering Player) is a so-called Event-response. It can be used in actions, as a response to the event that triggered the trigger.
@s3rius: Go
Not suprisingly your simple fix didn't work. Triggering player worked all the other times I used it to display Dialogs, but just for the sake of it I tried setting it to anyplayer and it didn't work my friend.
Alright, so what exactly doesn't work? Both of the triggers shown or only the right one?
Also, try adding a new action to the trigger(s) that don't work. A simple action like Display Text Message, just to see whether the error lies in the Event/Condition or the Actions.
PS: Also, when you use a checkbox you probably have to change
Dialog - Any Dialog Item is Clicked by Player Any Player
to
Dialog - Any Dialog Item is Checked by Player Any Player
@s3rius: Go
Sorry I wasn't clear the first code worked perfeclty, the second did not. But it was your final suggestion (clicked to checked) that fixed it, thanks for finding my oversight.
Code pictures removed.
I have been investigating the thing with using Triggering Player in the event, by the way and it's quite funny:
The value of Any Player is -1, so giving -1 to the event as a parameter will have the same effect.
Since Triggering Player is invalid when used in events it returns an error code, which is, coincidentally also -1 (that's a normal thing to do in programming when you're using the 0 already).
So it only works because it isn't supposed to work :]