![]() |
dynamic setshape2?
Ok so i dont really know if this is possibile or not yet, i know what im trying to do, and ive done it every way i can really think of.
What i was trying to do was use imgwidth and imgheight to get the first two numbers for setshape2 then based on that, turn it into the correct tiletype. So here is what i did NPC Code: from that i get i think 5 for length and 3 for width, anyways then I got here, and its where i have my question NPC Code: now i guess what im wondering is if its possibile to set the tiletypes based on the length and width of an image, Say i had two diffrent chairs, but one is larger then the other. Mabye there is something i have overlooked, or this just isnt possibile yet. (or at all ever? :( ) |
Quote:
NPC Code: |
dunno if you can pass arrays to the command, but try creating an array with the tiletypes;
array = {22,22,22,0,22,0}; or so (probably need to use a for loop) and pass it like so setshape2 int(this.length/16),int(this.width/16),array; works on showpoly, well I think it does... my script that uses that doesn't work for everyone for some reason... |
I'm pretty sure you can use arrays for setshape2. I've seen it done before.
|
I used arrays a while ago with setshape, it worked from time to time but not all the time, never understood why. This is SOOOOOO a Kai answer that you need.
|
its not so much getting the array i need, its passing the array into it.
ive tried for loops and stuff, but i guess im just pretty bad with setting it up like for example i decided mabye i could pass it as an index of a string, but that showed no results either. |
NPC Code:this.width = int(width); Try that. |
....that would still turn out in pixels, and setshape2 uses tiles.
|
Shouldn't it be...
NPC Code: |
Quote:
|
| All times are GMT +2. The time now is 02:56 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.