Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

WHy do scripts not work?


Hippoman789
 Share

Recommended Posts

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

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 1
Call PlaySound(index, "sword.wav")
exit sub

Case 2
Call PlayerMsg(index, GetPlayerName(index) & " My script works!!", 12)
Exit Sub

Case Else
Call PlayerMsg(Index, "No tile script found. Please contact an admin to solve this

problem.", WHITE)
Exit Sub

End Select

End Sub
```
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...