Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-01-2006, 05:09 PM
ToNy_W ToNy_W is offline
Registered User
Join Date: Aug 2003
Location: Quebec
Posts: 130
ToNy_W is on a distinguished road
Send a message via AIM to ToNy_W
Showpoly problem!

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!
Attached Thumbnails
Click image for larger version

Name:	showpoly.gif
Views:	152
Size:	14.1 KB
ID:	38062  
Reply With Quote
  #2  
Old 10-01-2006, 05:17 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
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";

__________________

Reply With Quote
  #3  
Old 10-01-2006, 05:25 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by ZeroTrack View Post
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; ?
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #4  
Old 10-01-2006, 05:43 PM
ToNy_W ToNy_W is offline
Registered User
Join Date: Aug 2003
Location: Quebec
Posts: 130
ToNy_W is on a distinguished road
Send a message via AIM to ToNy_W
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

Last edited by ToNy_W; 10-01-2006 at 06:20 PM..
Reply With Quote
  #5  
Old 10-01-2006, 06:48 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
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).
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #6  
Old 10-02-2006, 11:10 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by contiga View Post
Insert dimension = 2; ?
Yeah =p i was just giving him proper format =p
__________________

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 11:11 PM.


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