(-1 being any player and any dialogcontrol, 0 being eventtype clicked)
or any variation, the trigger that I use does not respond in the least. This event responds supposedly to any DialogControl, and it should respond to any DialogControl being clicked.
UIDisplayMessage(PlayerGroupSingle(owner),5,StringToText("You pressed some dialog control"));
is the only thing inside the trigger and it should show me a message that I pressed a button. This does not happen, but I also get no syntax errors.
Another note, the commented script below also works, I just tried a different method of creating the button which works the same way except adds a tooltip.
//DialogControlCreate(DialogLastCreated(), 3); libNtve_gf_CreateDialogItemButton(DialogLastCreated(),165,45,3,25,-135,StringToText("Strength"),(StringToText("STR ")+IntToText(HeroSTR[owner])),null);// CREATE THE BUTTON//DialogControlSetSize(DialogControlLastCreated(), PlayerGroupSingle(owner), 165, 45); // SET BUTTON SIZE//DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupSingle(owner), 3, 25, -135); // SET BUTTON X/Y (lEFT/RIGHT UP/DOWN OFFSET, in pixels, automatically anchors to the middle left?)//DialogControlSetPropertyAsText(DialogControlLastCreated(), 1, PlayerGroupSingle(owner), (StringToText("STR ") + IntToText(HeroSTR[owner]))); // SET BUTTON TEXTDialogControlSetEnabled(DialogControlLastCreated(),PlayerGroupSingle(owner),true);DialogControlSetVisible(DialogControlLastCreated(),PlayerGroupSingle(owner),true);DialogControlSetPropertyAsBool(DialogControlLastCreated(),36,PlayerGroupSingle(owner),true);//libNtve_gf_SetDialogItemClickOnDown (DialogControlLastCreated(), PlayerGroupSingle(owner), true);HeroControl[owner][0]=DialogControlLastCreated();
The Button Code itself
//=====================================================================================================// ProgressionSystem Point Distribution// FUNCTION//=====================================================================================================boolgt_ProgressionSystemPoints_Func(booltestConds,boolrunActions){//=====================================================================================================// LOCAL VARS //=====================================================================================================intowner;intcontrol;//=====================================================================================================// ACTIONS//=====================================================================================================UIDisplayMessage(PlayerGroupSingle(owner),5,StringToText("You pressed some dialog control"));returntrue;}//=====================================================================================================// ProgressionSystem Point Distribution// EVENTS//=====================================================================================================voidgt_ProgressionSystemPoints_Init(){//ProgressionSystem // initializes the trigger for usegt_ProgressionSystemPoints=TriggerCreate("gt_ProgressionSystemPoints_Func");// actually spawns the trigger, like variables must be called first TriggerAddEventDialogControl(gt_ProgressionSystemPoints,-1,-1,0);}
So I created a dialog control, it's type is button. They show up fine, they can be clicked on and they act like buttons, etc. etc.
I actually created them 2 different ways, shown above. Both of them act in the exact same manner.
My problem is that when I click on them, I need to be able to distribute a point (attributes) to the stat button that is clicked on.
However, I use the event below
(-1 being any player and any dialogcontrol, 0 being eventtype clicked) or any variation, the trigger that I use does not respond in the least. This event responds supposedly to any DialogControl, and it should respond to any DialogControl being clicked.
is the only thing inside the trigger and it should show me a message that I pressed a button. This does not happen, but I also get no syntax errors.
Another note, the commented script below also works, I just tried a different method of creating the button which works the same way except adds a tooltip.
The Button Code itself
Either nobody has any idea or there's some blatantly obvious problem that everyone but me sees. Either way, nobody has a lock on this?
There was a blatantly obvious problem. I figured out that c_dialogControlAny was not the integer I needed to use to detect "any" dialog.
Instead, c_invalidDialogControlId is the actual integer needed to detect any dialog control being used. No wonder!