Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-22-2009, 08:32 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
tiles[] & updateboard

HTML Code:
function onCreated() {
  this.setshape(1, 64, 64);

  temp.tiles = {0x12D, 0xAA, 0xF, 0xAA,
                0xAA, 0x17D, 0xAA, 0xAA,
                0xAA, 0xAA,  0x8, 0xAA,
                0xAA, 0xAA, 0xAA, 0x17E};
  for (temp.i = 0; temp.i < 16; temp.i++) {
    tiles[this.x + temp.i 'DIV' 4, this.y + int(temp.i / 4)] = randomstring(temp.tiles); //Change the 'DIV' to a percent sign
  }
  updateboard(this.x, this.y, 4, 4);

  setTimer(50);
}
It should create a set of 16 tiles at the drop position, but it's not... Any ideas? thanks
Reply With Quote
  #2  
Old 08-22-2009, 11:11 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I might be wrong, but I believe you need to use "updateboard2".
__________________
Reply With Quote
  #3  
Old 08-22-2009, 11:16 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
First thing I'd try is changing the name of that array. "tiles" might be reserved.
Reply With Quote
  #4  
Old 08-22-2009, 11:29 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Haha- updateboard2 worked. Thanks guys
I also re-named the tiles flag, thank you
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 12:03 AM.


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