RJD. |
In my game's intro, I want to have a button appear when you click, such as in later Space Quests, asking if you want to watch the intro, skip, or restore. I tried following Brians Tut. and using the button code from there, but where I am trying it it doesnt work // End the title screen, start the game As you can see, scripting isn't my specialty. When I try compiling this, the script says "Undefined Symbol "var". I would also like to know how to close the whole thing if the player chooses to watch the intro. I know how to make it restore, I just haven't bothered putting it in first. Help!!! |
doan sephim |
what method do you have that in? i think you need to have that in the handle event method (which is in the RoomScript instance). like: (method (handleEvent pEvent) (var button) (super:handleEvent(pEvent)) then if you want to have the intro inturruptable by a button to skip it you could just copy and paste the code from the title screen: (if(not(send pEvent:claimed)) (if( (==(send pEvent:type) evKEYBOARD) and (==(send pEvent:message) $3C00)) ToggleSound() )(else (send gRoom:newRoom(INITROOMS_SCRIPT)) ))) and instead of the [(send gRoom:newRoom(INITROOMS_SCRIPT)] you would put your [= button Print...] i might be wrong but i think you have to have the variables in the method before the (super)'s of that method or else it wont understand what it is. i think that should work...but i'm kinda dumb at coding too, sooooo...i'll let anyone else correct me. doan |
RJD |
Thanks doan, but I already got it working. The code for anybody that wants it: (if(CAN_CONTINUE) Keep in Mind thar this is meant specifically for my titlescreen Thanks anyways Doan! |