Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Setshape Problem (https://forums.graalonline.com/forums/showthread.php?t=134266938)

clarke119 08-06-2012 08:10 PM

Setshape Problem
 
Hey Guys,

After quitting graal for a while, I've decided to take scripting back up. However, I am trying to refresh my memory of how setshape and setshape2 work.

I do remember that setshape is for pixels and setshape2 is for tiles. But do not remember how sethshape functions.

For example say this was a box for a chance event.
http://img688.imageshack.us/img688/8916/boxxm.png

Would I be using setshape2? and how would I go about the width and height etc in a (,,,) format?

Thanks a lot,
Clarke

Crow 08-06-2012 10:33 PM

If it's just a rectangle, you should be using setShape(). setShape2() is useful for shapes that are not just simple rectangles, and can also be used to change tile types in an easy manner.
PHP Code:

setShape(16448);
// rectangle with width = 64 pixels = 4 tiles and height = 48 pixels = 3 tiles; first argument should always be 1

setShape2(32,
  { 
333,
     
33});
// rectangle, three by two tiles (first two arguments are width and height); the third argument is an array containing
// the tiletypes of the shape in order, starting at the top left, going row by row; here you can use 0 to basically "ignore"
// a tile, because that's the non-blocking tiletype (see  http://wiki.graal.net/index.php/Tiletype) 



All times are GMT +2. The time now is 02:12 PM.

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