I'm having problems with screen buttons. When I click one button it thinks I clicked all of them.
I copied the triggers as text.
Creation Trigger:
"
Events:
Game - Map initialization
Actions:
Dialog - Display button 1 of size (200, 60) with text "Show/Hide UI" at Top Right of screen with offset (30, 30) (run No Trigger when button is clicked)
Dialog - Display button 2 of size (200, 60) with text "Key Jamming" at Top Right of screen with offset (240, 30) (run No Trigger when button is clicked)
"
Button 1 Clicked Trigger:
"
Events:
Dialog - (Screen button 1) is Clicked by Player Any Player
Actions:
UI - Display "UI Show/Hide Clicked" for (All players) to Subtitle area
"
Button 2 Clicked Trigger:
"
Events:
Dialog - (Screen button 2) is Clicked by Player Any Player
Actions:
UI - Display "Key Jamming Clicked" for (All players) to Subtitle area
"
In game when I click either button it displays both "Key Jamming Clicked" and "UI Show/Hide Clicked", indicating that the events are the roots of the problem.
And I would have it run the "Clicked" triggers by setting the triggers while I create the buttons "(run No Trigger when button is clicked)" but if I do it that way I don't think it is possible to pass on the player number of the player that clicked the button seeing as how it won't run Action Definitions or Functions that can take parameters. So I'm trying it this way so that I can manipulate things only for the player that clicked the button.
I have a problem getting the event to work, it just doesn't fire.
Portrait Click
Events
Dialog - Any Dialog Item is Clicked by Player Any Player
Local Variables
Conditions
(Used dialog item) == Location Button 1
Actions
UI - Display "looool" for (All players) to Chat area
I have to use "any dialog item", because if I click on it and look under variables, my Dialog Item variables simply don't show up... but even with any item and without the condition nothing happens. Any ideas?
You dont need an active event for a trigger to have "triggering player". Eg: let your screen button run your trigger when created. Inside the next trigger, use the triggering player to refer only to the player who clicked that button. ( Just think triggering player as the player who make the trigger run )
I'm having problems with screen buttons. When I click one button it thinks I clicked all of them.
I copied the triggers as text.
Creation Trigger:
"
Events:
Game - Map initialization
Actions:
Dialog - Display button 1 of size (200, 60) with text "Show/Hide UI" at Top Right of screen with offset (30, 30) (run No Trigger when button is clicked)
Dialog - Display button 2 of size (200, 60) with text "Key Jamming" at Top Right of screen with offset (240, 30) (run No Trigger when button is clicked)
"
Button 1 Clicked Trigger:
"
Events:
Dialog - (Screen button 1) is Clicked by Player Any Player
Actions:
UI - Display "UI Show/Hide Clicked" for (All players) to Subtitle area
"
Button 2 Clicked Trigger:
"
Events:
Dialog - (Screen button 2) is Clicked by Player Any Player
Actions:
UI - Display "Key Jamming Clicked" for (All players) to Subtitle area
"
In game when I click either button it displays both "Key Jamming Clicked" and "UI Show/Hide Clicked", indicating that the events are the roots of the problem.
And I would have it run the "Clicked" triggers by setting the triggers while I create the buttons "(run No Trigger when button is clicked)" but if I do it that way I don't think it is possible to pass on the player number of the player that clicked the button seeing as how it won't run Action Definitions or Functions that can take parameters. So I'm trying it this way so that I can manipulate things only for the player that clicked the button.
Nevermind, I think I got it.
I was able to add in a condition that seems to be making it work for now.
Probably something like "Clicked Button == TheButtonSupposedToBeClicked".
I have a problem getting the event to work, it just doesn't fire.
Portrait Click
Events
Dialog - Any Dialog Item is Clicked by Player Any Player
Local Variables
Conditions
(Used dialog item) == Location Button 1
Actions
UI - Display "looool" for (All players) to Chat area
I have to use "any dialog item", because if I click on it and look under variables, my Dialog Item variables simply don't show up... but even with any item and without the condition nothing happens. Any ideas?
Any idea? Or is there another way to get click events from dialog buttons/items?
@anteevy:
any dialog item clicked works only for Dialog Buttons.... it has no effect with labels, images, etc..
the screen button event is bugged, create a condition like "button pressed = screen button x" or something in addition to the event and it will work
@stewie-Y: Go
You dont need an active event for a trigger to have "triggering player". Eg: let your screen button run your trigger when created. Inside the next trigger, use the triggering player to refer only to the player who clicked that button. ( Just think triggering player as the player who make the trigger run )
I have a other problem.
I made a menu for my custom campaign but everytime one screen button is missing.
When i change something in that button it wil return but then another is gone.
I already deleted some screen buttons but it doesnt help.
any ideas?