Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 06-09-2014, 07:35 PM
blackbeltben blackbeltben is offline
Registered User
Join Date: Aug 2011
Posts: 83
blackbeltben is on a distinguished road
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
i just realised that the first tile should be 0x0 rather than 1x1 as mentioned in your first post, 1x1 probably isnt even valid

should definitely work if you do:

PHP Code:
if (tiles[player.1.5player.2] == 0
taking a closer look at your snippet of code in the first post, its worth mentioning that it should be something like this if it isnt already:

PHP Code:
//#CLIENTSIDE
function onCreated()
  
this.onTimeout();

function 
onTimeout() {
  if (
tiles[player.1.5player.2] == 0) {
    
player.chat "Found Tile!";
  }
  
this.setTimer(0.05);

if something doesnt work as expected then you can also attempt to debug it like so:

PHP Code:
player.chat tiles[player.1.5player.2]; 


Yay it works

But can you explain how you did get 17 though? How do I calculate what tiles are equal to what value?
Reply With Quote
 


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:30 PM.


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