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 12-04-2003, 06:28 AM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
cropping zoomed images

Hmm, I'm having a problem, I hope I can explain it well... Ok, here goes.

If I have an image of, for example, 16*16 pixels, then I want to do a setzoomeffect of... 3... Ok, So i've done that, and now I should have an image of 48*48 pixels. (Unless my math is just THAT horrible). Ok. Now, what if I do a
NPC Code:

setimgpart img,0,0,48,32;



Well... Nothing...

I've tried this useing showimgs as well,

NPC Code:

if (created) {
showimg 143,setimgpart black.png,x,y;
changeimgzoom 143,10;
changeimgpart black.png,x+32,y,32,32;
}



Will this not work? Or am I just really horrible at scripting?
Reply With Quote
  #2  
Old 12-04-2003, 07:12 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
your script syntax is way off.

edit:

your a level maker so here ya go:
NPC Code:

if (created) {
showimg 143, block.png, x, y;
changeimgpart 143, 0, 0, 16, 16;
changeimgzoom 143, 1;
}

__________________
new account: Trevor
Reply With Quote
  #3  
Old 12-05-2003, 12:36 AM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
Quote:
Originally posted by tlf288
your script syntax is way off.

edit:

your a level maker so here ya go:
NPC Code:

if (created) {
showimg 143, block.png, x, y;
changeimgpart 143, 0, 0, 16, 16;
changeimgzoom 143, 1;
}

Oh right, I put the image name in changeimgzoom rather than the index...

And put setimgpart in the filename for showimg... Wtf 0.o; Eh, I guess I just made foolish mistakes while rushing to test this... Sorry to take up your time ;P
Reply With Quote
  #4  
Old 12-05-2003, 03:29 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
i am used to working with level makers who can't script there way out of a paper bag.
__________________
new account: Trevor
Reply With Quote
  #5  
Old 12-05-2003, 04:31 AM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
This still isnt working the way I wanted... I want it to perform the zoom command then set the image part with the zoomed image... @_@;
Reply With Quote
  #6  
Old 12-05-2003, 04:59 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
just decide what pixels you want enlarged before enlarging them.
__________________
new account: Trevor
Reply With Quote
  #7  
Old 12-05-2003, 06:57 PM
KainDaMan KainDaMan is offline
Registered User
Join Date: Jul 2003
Location: Virginia,USA
Posts: 51
KainDaMan is on a distinguished road
Send a message via AIM to KainDaMan
Perhaps you should try showing the image, cropping it from it's 16x16 size, then zoom it... The changeimgpart command might not even take into consideration zoom factor, and thus you would have to crop from the 16x16 size rather than the zoomed size, even if it is already zoomed... that's just a guess btw, so don't hold me to it
__________________
---Kain Morbid
Reply With Quote
  #8  
Old 12-05-2003, 11:41 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
I just wish that zooming wouldn't change the image's position, it makes it rather cumbersome to show a dynamically zoomed image at the correct position...
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #9  
Old 12-06-2003, 12:23 AM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
Well, that was just an example, what I really wanted to do was have a one pixel image of a certian colour so I could use it to make it look like a room was being filled with water.... I suppose I could use polygons... But only V3+ supports alpha blending for those, and I wanted the water to be translucent.
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 10:26 PM.


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