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-06-2012, 08:10 PM
clarke119 clarke119 is offline
Registered User
Join Date: May 2010
Posts: 23
clarke119 is on a distinguished road
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.


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

Thanks a lot,
Clarke
__________________
Reply With Quote
  #2  
Old 08-06-2012, 10:33 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
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) 
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 05:51 AM.


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