kingsushi Posted June 13, 2015 Share Posted June 13, 2015 Hi everyoneI'm having some trouble trying to execute a script through clickable_add.This is what I have:Spritesspr_room1spr_room2Scriptsgmcallback_scr_room1()rname="one";room_goto(room1);gmcallback_scr_room2()room_goto(room2);Objectsobj_btns (persistent)create eventrname="Start";btn_room1=clickable_add((browser_width/2)-100,browser_height/2,sprite_get_tpe(spr_room0,0),"gmcallback_scr_room1()","","");btn_room2=clickable_add((browser_width/2)+100,browser_height/2,sprite_get_tpe(spr_room1,0),"gmcallback_scr_room2()","","");draw eventdraw_text(10,10,string(rname));Rooms (all 640x480)room0 (contains obj_btns and window_center() in room Creation code)room1room2When clicking on btn_room2, it goes to room2, but when clicking on btn_room1, it does absolutely nothing.Am I doing something wrong or am I missing something about how the clickable_add function works?Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
kingsushi Posted June 15, 2015 Author Share Posted June 15, 2015 Someone on the GMC helped me out. Seems like the function is a bit bugged.But using "obj_btns.rname="one"" works just fine. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.