scripting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting [2020/02/17 20:27] – [Event Scripting] mit | scripting [2023/05/15 02:07] (current) – [Custom Events] mit | ||
---|---|---|---|
Line 26: | Line 26: | ||
Event( " | Event( " | ||
{ | { | ||
- | *say %PLAYER% built building 3 | + | *say %PLAYER% built building |
- | *grantitem %PLAYER% Special Item | + | *grantitem %PLAYER% |
} | } | ||
</ | </ | ||
- | If you've already been playing around with owner features on your world, then the *commands might already be familiar - Just about anything you can do using the commands on the server you can do through the scripting system - which leads to lots of possible clever features done in script. | + | If you've already been playing around with owner features on your world, then the *commands might already be familiar - Just about anything you can do using the commands on the server you can do through the scripting system - which gives the script |
For details on the range of events supported see the [[scripting: | For details on the range of events supported see the [[scripting: | ||
===== Script Files ===== | ===== Script Files ===== | ||
- | The primary ' | + | The primary ' |
For a quick Hello World example.. Connect to your world, copy the code block below into your serverscript.mit, | For a quick Hello World example.. Connect to your world, copy the code block below into your serverscript.mit, | ||
Line 50: | Line 50: | ||
The intention is that eventually the Script Editor in the F10 World Editor screens would provide that functionality however that is a long way from being complete or usable. | The intention is that eventually the Script Editor in the F10 World Editor screens would provide that functionality however that is a long way from being complete or usable. | ||
+ | |||
+ | ===== Custom Events ===== | ||
+ | Custom Events are a special type of event that is triggered from a command and can include custom parameters. | ||
+ | e.g. '' | ||
+ | |||
+ | will trigger an event specified in your script code like: | ||
+ | |||
+ | < | ||
+ | { | ||
+ | $text = $gTextParam[1] | ||
+ | *say Your Parameter was $text | ||
+ | }</ | ||
+ | |||
+ | Custom events can be triggered for groups of players - e.g. for everyone online (' | ||
scripting.1581992867.txt.gz · Last modified: 2020/02/17 20:27 by mit