Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Showpoly problem! (https://forums.graalonline.com/forums/showthread.php?t=69100)

ToNy_W 10-01-2006 05:09 PM

Showpoly problem!
 
1 Attachment(s)
Alright, i don't know if i'm doing something wrong there or if it just shouldn't be done, but here's my problem:

i draw a polygon with showpoly:

showpoly(200,{player.x, player.y, player.x + 5, player.y, player.x + 5, player.y + 5, player.x, player.y + 5});

and then i try setting an image:

findimg(200).image = "image.gif";

when i use door.png or block.png it works, the image takes the size of the polygon and all, but if i try with images that i uplaoded by myself (png or gif, i've tried both), it gets all weird x-x!

ZeroTrack 10-01-2006 05:17 PM

Dunno, but better way to script that would be
PHP Code:

with(findimg(200)){
  
polygon = {player.xplayer.yplayer.5player.yplayer.5player.5player.xplayer.5};
  
image "image.gif";



contiga 10-01-2006 05:25 PM

Quote:

Originally Posted by ZeroTrack (Post 1224476)
Dunno, but better way to script that would be
PHP Code:

with(findimg(200)){
  
polygon = {player.xplayer.yplayer.5player.yplayer.5player.5player.xplayer.5};
  
image "image.gif";



Insert dimension = 2; ?

ToNy_W 10-01-2006 05:43 PM

Ok i tested it again with the method stefan used for his v4.1 release example

with (findimg(200)) {
layer = 4;
dimension = 2;
polygon = {100,100,200,100,200,200,100,200};
image = "menu_1.png";
}

the image is still messed up x-x

Dach 10-01-2006 06:48 PM

For anyone else that want's to know how to get them to work, you must use power of two sized images that are square. The only other requirements seem to be that the image is veiwable in Graal (suprise!) and that your polygons are quads (four sided, another suprise).

ZeroTrack 10-02-2006 11:10 PM

Quote:

Originally Posted by contiga (Post 1224478)
Insert dimension = 2; ?

Yeah =p i was just giving him proper format =p


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

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