Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   tiles[] & updateboard (https://forums.graalonline.com/forums/showthread.php?t=87561)

[email protected] 08-22-2009 08:32 PM

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

cbk1994 08-22-2009 11:11 PM

I might be wrong, but I believe you need to use "updateboard2".

Crow 08-22-2009 11:16 PM

First thing I'd try is changing the name of that array. "tiles" might be reserved.

[email protected] 08-22-2009 11:29 PM

Haha- updateboard2 worked. Thanks guys :)
I also re-named the tiles flag, thank you :)


All times are GMT +2. The time now is 08:41 AM.

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