Sonck Posted May 16, 2008 Share Posted May 16, 2008 hello.this is a script ive been working on. when u activate a teleportation stone it asks you to which floor you want to go.the problem is that no matter which option you choose, it always teleports you to the first option. please tell me what is wrong scn JKCPTeleportStonesScript short button short buttonPressed short getbuttonpressed Begin OnActivate if IsActionRef player == 1 set buttonPressed to 1 set button to -1 messagebox "teleport to?", "level 1", "level 2", "level 3" endif end begin gamemode if buttonPressed == 1 set button to getbuttonpressed if button > -1 if button == 0 set buttonPressed to 0 set button to -1 player.movetomarker JKCPXMarkerRoom01 elseif button == 1 set buttonPressed to 0 set button to -1 player.movetomarker JKCPXMarkerRoom00 elseif button == 2 set buttonPressed to 0 set button to -1 player.movetomarker JKCPXMarkerRoomM1 endif endif elseif buttonPressed == 0 set button to -1 endif end Link to comment Share on other sites More sharing options...
Aoikani Posted May 17, 2008 Share Posted May 17, 2008 hello.this is a script ive been working on. when u activate a teleportation stone it asks you to which floor you want to go.the problem is that no matter which option you choose, it always teleports you to the first option. please tell me what is wrong scn JKCPTeleportStonesScript short button short buttonPressed short getbuttonpressed Begin OnActivate if IsActionRef player == 1 set buttonPressed to 1 set button to -1 messagebox "teleport to?", "level 1", "level 2", "level 3" endif end begin gamemode if buttonPressed == 1 set button to getbuttonpressed if button > -1 if button == 0 set buttonPressed to 0 set button to -1 player.movetomarker JKCPXMarkerRoom00 elseif button == 1 set buttonPressed to 0 set button to -1 player.movetomarker JKCPXMarkerRoom01 elseif button == 2 set buttonPressed to 0 set button to -1 player.movetomarker JKCPXMarkerRoomM1 endif endif elseif buttonPressed == 0 set button to -1 endif um, yeah it's kind of messed up. that happens ^^ I'm not the greatest scriptor but I can see some things there that is incorrect. I had to learn by looking at existing ingame scripts and reading the wiki then running tests to see how things worked. I suggest that you check the wiki out TES Contruction Set Wiki But just to point out, do you notice you don't have an 'end' for your 'begingamemode'? and not really sure, but you may have one too many 'elseif'. you actually got this to run that all the way through? I'll test it out for you but you'll have to wait till the weekend before I can get to it. Lot's of stuff to do ^^ Link to comment Share on other sites More sharing options...
Sonck Posted May 17, 2008 Author Share Posted May 17, 2008 ok i didnt copy the scrpt correctly, ill edit the above script. just forgot an "end" i think Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.