Hippoman789 Posted February 16, 2009 Author Share Posted February 16, 2009 ```' Executes when a player steps onto a scripted tile.Sub ScriptedTile(Index, Script) Select Case Script Case 0 Call PlayerMsg(index, GetPlayerName(index) & "My script works!!", 12) End Select Exit SubEnd Sub```updated. Link to comment Share on other sites More sharing options...
Agoraphobic Posted February 16, 2009 Share Posted February 16, 2009 Its missing an exit sub after the case I do believe. Link to comment Share on other sites More sharing options...
Hippoman789 Posted February 16, 2009 Author Share Posted February 16, 2009 Ok i added that.[edit]still doesnt work. Link to comment Share on other sites More sharing options...
Agoraphobic Posted February 16, 2009 Share Posted February 16, 2009 I put in your code and it runs fine.```' Executes when a player steps onto a scripted tile.Sub ScriptedTile(Index, Script) Select Case ScriptCase 0 Call PlayerMsg(index, GetPlayerName(index) & "My script works!!", 12) End Select Exit SubEnd Sub ``` Link to comment Share on other sites More sharing options...
Hippoman789 Posted February 16, 2009 Author Share Posted February 16, 2009 Tell me.after you put it in. what did you do?are scripts ON in the server?are they in Server 0?do i need to reload them?Run them?what does the 12 mean?WHAT DO I DO?! Link to comment Share on other sites More sharing options...
Jarvis Posted February 16, 2009 Share Posted February 16, 2009 12 is for color. See the top of Main.txt for color numbers. After updating the Main.txt, you must reload the scripts for the new code to take effect. Go into the map editor, and change to the attributes. Find the scripted tile attribute, it will ask to select a number, so select 0 for case 0\. Place that attribute wherever you want the script to run. Link to comment Share on other sites More sharing options...
Agoraphobic Posted February 16, 2009 Share Posted February 16, 2009 I simply added it to my main and reloaded the scripts. Any scripts you add you must reload them to the server. Then I go to the map editor and placed down scripted tile with script 0.In my Data.ini for the server folder scripts are set to 1.Please post your entire scripted tile section.This is my main, all 3 cases work perfectly.```' Executes when a player steps onto a scripted tile.Sub ScriptedTile(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "You stare off into the distance and see moutains on the horizon. You realize your journey has only begun.", WHITE)Call PlaySound(index, "main.wav") Exit Sub Case 1Call PlaySound(index, "sword.wav")exit subCase 2Call PlayerMsg(index, GetPlayerName(index) & " My script works!!", 12)Exit SubCase ElseCall PlayerMsg(Index, "No tile script found. Please contact an admin to solve this problem.", WHITE)Exit SubEnd SelectEnd Sub``` Link to comment Share on other sites More sharing options...
Hippoman789 Posted February 16, 2009 Author Share Posted February 16, 2009 OMG G OMGOGMOGMSGDSTHANK YOU JARVIS!it works!i had to reload! why does nobody tell me that?! Link to comment Share on other sites More sharing options...
munro Posted February 16, 2009 Share Posted February 16, 2009 @Hippoman:> i had to reload! why does nobody tell me that?!Because its logic LOL Link to comment Share on other sites More sharing options...
Hippoman789 Posted February 16, 2009 Author Share Posted February 16, 2009 …I just started scripting...Nobody says the basics.they just say it works. Link to comment Share on other sites More sharing options...
Agoraphobic Posted February 16, 2009 Share Posted February 16, 2009 I'm glad you got it working. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now