Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-22-2010, 01:48 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by fowlplay4 View Post
Try this:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
addtiledef("npulse_outside_tiles.png""npulse_"1);
  
addtiledef("npulse_outside_tiles.png""stafflevel_"1);
  
addtiledef("npulse_inside_tileset.png""npulse_inside_"1);

addtiledef in a timeout loop is just bad...
Not just bad but completely un-necessary in this case due to the fact the addtiledef functions contains a levelstart parameter as you've shown.

Quote:
Originally Posted by SlikRick View Post
PHP Code:
 if (player.level.name.starts("npulse_") && player.level.name.starts("stafflevel_")) 
Probably also worth mentioning that it is an impossibility for both of these conditions to be true.
Reply With Quote
  #2  
Old 12-22-2010, 01:43 AM
Matt Matt is offline
iZone Administrator
Matt's Avatar
Join Date: Apr 2005
Location: United States
Posts: 2,690
Matt is a jewel in the roughMatt is a jewel in the rough
That did the trick, thank you very much and we appreciate it.
__________________
Need Playerworld or Account support?
GraalOnline/Toonslab Support Center
Reply With Quote
  #3  
Old 12-22-2010, 02:39 AM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Quote:
Originally Posted by SlikRick View Post
if (player.level.name.starts("npulse_") && player.level.name...
replace && with ||

&& (AND) will check if both conditions are true, while || (OR) will check if either one of them is true.
Reply With Quote
  #4  
Old 12-22-2010, 08:16 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Why would you EVER want to even try using addtiledef in a timeout, like, seriously? Best thing to do is initialize all tiledefs for the entire server in onCreated and leave it at that.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.