Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
street [2026/11/12 19:45] – [Events] fix typo Bobblestreet [2026/11/20 05:33] (current) – [Sample Scripts] format sample script Bobble
Line 91: Line 91:
 <code> <code>
 # Alert HELLO when a player is within the range of the door. # Alert HELLO when a player is within the range of the door.
-Street.on( "tick", () => +Street.on( "tick", () => { 
-{ +    if( Street.isPlayerNear( "door", 50 ) ) { 
-    if( Street.isPlayerNear( "door", 50 ) ) { Street.sendEvent( "open_door" ); } +        Street.sendEvent( "open_door" ); 
-} );+    } 
 +});
  
-Street.on( "event", (name, data, from) => { if( name === "open_door" ) { alert('HELLO'); } } );+Street.on( "event", (name, data, from) => { 
 +    if( name === "open_door" ) { 
 +        alert('HELLO');  
 +    } 
 +}); 
 +</code> 
 + 
 +<code> 
 +# A custom chat command that replies with the player's street name. 
 +document.addEventListener("DOMContentLoaded", function(event) { 
 +    Street.registerCommand("hello", helloPlayer, '/hello - welcomes the player'); 
 +}); 
 + 
 +function helloPlayer() { 
 +    const player = Street.me.streetName; 
 +    Street.say(`Hello ${player}!`); 
 +}
 </code> </code>
  


@000 Melon
Land
Forum Art Hub Chat Webring Explore Random Recent Tenement Arcade Want to Login or Join ? Web Craft Guide Graphic Catalogue Wiki Help I'm Lost! Link Land Newsletters Image Stream Minecraft: Online Zap!
Passport Sites tamaNOTchi Asatte Add your site?
Aero Archive Onio Cafe 32 Bit Cafe Status Cafe