Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-25-2002, 12:19 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Image Effects!

I think it would be nice if there was a command for showimgs that would automatically run through some kind of image manipulate routine such as making it wave like a flag or ripple...without having to use gifs or mngs.

This would be nice so that I (or other people) don't have to use bunch of NPCs to create the effect I want.

maybe something like changeimgeffect index,effectnumber;

0 - normal (default)
1 - Wave Effect
2 - Ripple
3 - Fire
etc.
__________________
Reply With Quote
  #2  
Old 08-25-2002, 02:27 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Re: Image Effects!

Kinda nice, I guess, but there are problems. Those things need to be prerendered, and that'd stand a chance of causing noticable slowdown. There are ways around it yadda yadda but it's easier if people just use mngs.
__________________
Reply With Quote
  #3  
Old 08-26-2002, 11:16 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Re: Re: Image Effects!

Quote:
Originally posted by Kaimetsu
Kinda nice, I guess, but there are problems. Those things need to be prerendered, and that'd stand a chance of causing noticable slowdown. There are ways around it yadda yadda but it's easier if people just use mngs.
I suppose...unless I can get my great NPC scripter to help or someone else

It looks neat what I've done so far...but I'm having a little difficulty trying to figure out a way to do it all with one NPC.

NPC Code:
//#CLIENTSIDE
if (playerenters) {
this.imgx = 0;
this.img = 1;
this.y = 0;
showimg this.img,dk_logo.png,screenwidth/2304+this.imgx,12+this.y;
changeimgcolors this.img,1,1,1,1-(this.y*.01);
changeimgpart this.img,this.imgx,0,1,112;
changeimgvis this.img,7;
timeout = .05;
}

if (timeout) {
this.y = 0;
for (this.y=0; this.y<24; this.y=this.y+1.5) {
showimg this.img,dk_logo.png,screenwidth/2-304+this.imgx,12+this.y;
changeimgcolors this.img,1,1,1,1-(this.y*.01);
changeimgpart this.img,this.imgx,0,1,112;
changeimgvis this.img,7;
sleep .05;
}
for (this.y=24; this.y>-1; this.y=this.y-1.5) {
showimg this.img,dk_logo.png,screenwidth/2-304+this.imgx,12+this.y;
changeimgcolors this.img,1,1,1,1-(this.y*.01);
changeimgpart this.img,this.imgx,0,1,112;
changeimgvis this.img,7;
sleep .05;
}
timeout = 0.05;
}



That is what the script is for one vertical line (1x112) and the image is 608 pixels wide. I know there's a way to do it with one NPC I just keep hitting the wrong way...heck I've even come up with an idea on how to possibly determine needed lines using imgwidth(); just not sure how to get one NPC to do all of those lines in a very smooth manner. I'll keep working at it though...eventually I'll get it
__________________
Reply With Quote
  #4  
Old 08-26-2002, 11:18 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Sorry, forgot to post a screenshot of what it looks like (or what I've got so far using ~50 NPCs :x)
Attached Thumbnails
Click image for larger version

Name:	graal.png
Views:	182
Size:	28.3 KB
ID:	20030  
__________________
Reply With Quote
  #5  
Old 08-26-2002, 11:36 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
I'm not sure if I know what you're doing. Something like this?
Attached Files
File Type: zip dk.zip (3.6 KB, 168 views)
__________________
Reply With Quote
  #6  
Old 08-26-2002, 01:23 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Kaimetsu
I'm not sure if I know what you're doing. Something like this?
*stunned*

You hit it dead center!

*dies*

Might I recieve permission to use this on my PW?
__________________
Reply With Quote
  #7  
Old 08-26-2002, 01:48 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by G_yoshi


*stunned*

You hit it dead center!

*dies*

Might I recieve permission to use this on my PW?
Yeah, whatever. It took me about a minute to write, I'm not gonna get possessive over it.
__________________
Reply With Quote
  #8  
Old 08-26-2002, 01:54 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Kaimetsu


Yeah, whatever. It took me about a minute to write, I'm not gonna get possessive over it.
ok

I've had a little fun manipulating it...very neat
Attached Thumbnails
Click image for larger version

Name:	graal.png
Views:	176
Size:	48.1 KB
ID:	20035  
__________________
Reply With Quote
  #9  
Old 08-27-2002, 06:23 AM
DarkPyro_2001 DarkPyro_2001 is offline
Über-1337 Member
DarkPyro_2001's Avatar
Join Date: Jun 2001
Location: Graal Classic Jail
Posts: 1,184
DarkPyro_2001 is on a distinguished road
Send a message via ICQ to DarkPyro_2001 Send a message via AIM to DarkPyro_2001 Send a message via Yahoo to DarkPyro_2001
'Theif'? You sad, sad little man.
__________________
Friends University of Central Kansas... weird acronym, weird place.

NoFace (3/25/02 8:42:10 PM):
Mass message:
how do u get the trident to work?
Reply With Quote
  #10  
Old 08-27-2002, 06:31 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by DarkPyro_2001
'Theif'? You sad, sad little man.
What are you talking about here?
__________________
Reply With Quote
  #11  
Old 08-27-2002, 04:10 PM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
Quote:
Originally posted by Kaimetsu


What are you talking about here?
He spelled Thief wrong, in his JobClass select screen.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
  #12  
Old 08-27-2002, 07:18 PM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
yup lol btw koni like your sig
Reply With Quote
  #13  
Old 08-28-2002, 02:00 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by konidias


He spelled Thief wrong, in his JobClass select screen.
Oh, I see. That makes sense
__________________
Reply With Quote
  #14  
Old 08-30-2002, 09:18 AM
RavenTelvecho RavenTelvecho is offline
Registered User
RavenTelvecho's Avatar
Join Date: Apr 2002
Location: Toronto, Ontario, Canada
Posts: 0
RavenTelvecho is on a distinguished road
Send a message via ICQ to RavenTelvecho Send a message via AIM to RavenTelvecho Send a message via Yahoo to RavenTelvecho
R0bin:
if(created){
x=x-(1/16);
timeout=0.05;
this.imgwidth=394;
this.imgheight=260;
hide;
}
if(timeout){
timeout=0.05;
this.speed+=4;
for(i=this.imgwidth;i!=0;i--{
showimg i,#f,x+(i/16),y+sin((i+this.speed)*0.03);
changeimgpart i,i,0,1,this.imgheight;
}
}

I edited kai's code so you could use it in-level.
__________________

^tuff newbie ;x
RavenTelvecho
!Booj
we are 'brothers'
Reply With Quote
  #15  
Old 08-30-2002, 09:33 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
AAAAAAAAAAAAAAAAAAAAAA!
GODAWFUL CODING!
*dies*
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #16  
Old 08-30-2002, 02:48 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Tyhm
AAAAAAAAAAAAAAAAAAAAAA!
GODAWFUL CODING!
*dies*
*shrugs*

It wasn't made for efficiency, I really just wanted to get the concept down. In reality I would've used precalculated variables, alternatives to trigonometric functions/lookup tables blah blah.
__________________
Reply With Quote
  #17  
Old 08-31-2002, 01:26 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
if(created){
x=x-(1/16); //drift online
timeout=0.05; //only work reliably once ever
this.imgwidth=394; //ditto
this.imgheight=260; //ditto
hide;
}

To make this work online, you'd need

if(created){
if(visible) x=x-(1/16); //middling, it's best to put in the exact x
hide;
}
if(playerenters){
timeout=0.05;
this.imgwidth=394;
this.imgheight=260;
}

Don't believe me? Put a warp in your level to another level, and vice versa. When you reenter, everything goes plotz.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #18  
Old 08-31-2002, 01:36 AM
RavenTelvecho RavenTelvecho is offline
Registered User
RavenTelvecho's Avatar
Join Date: Apr 2002
Location: Toronto, Ontario, Canada
Posts: 0
RavenTelvecho is on a distinguished road
Send a message via ICQ to RavenTelvecho Send a message via AIM to RavenTelvecho Send a message via Yahoo to RavenTelvecho
R0bin: Who said i wanted it online?
If people decide to use it in their levels, they can fix it themselves.
__________________

^tuff newbie ;x
RavenTelvecho
!Booj
we are 'brothers'
Reply With Quote
  #19  
Old 08-31-2002, 01:52 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
I haven't looked at the script, but what Tyhm posted looks like it wouldn't even work offline if you leave the level and reenter it.
(just try pressing F5 and press Load).

And I am always trying to make my scripts compatible with the online mode. (but not with server side scripting)
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #20  
Old 08-31-2002, 05:33 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Tyhm
if(created){
x=x-(1/16); //drift online
timeout=0.05; //only work reliably once ever
this.imgwidth=394; //ditto
this.imgheight=260; //ditto
hide;
}

To make this work online, you'd need

if(created){
if(visible) x=x-(1/16); //middling, it's best to put in the exact x
hide;
}
if(playerenters){
timeout=0.05;
this.imgwidth=394;
this.imgheight=260;
}

Don't believe me? Put a warp in your level to another level, and vice versa. When you reenter, everything goes plotz.
Ehem, if you put //#CLIENTSIDE at the beginning of the NPC, I'm pretty sure it will work
__________________
Reply With Quote
  #21  
Old 08-31-2002, 07:43 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
I find that highly suspect. If it's clientside, then the NPCServ created condition fires both once ever (so that the x+=is only called once) and every time a player enters (so that timeout doesn't die and the variables stay defined)
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #22  
Old 08-31-2002, 08:31 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Tyhm
I find that highly suspect. If it's clientside, then the NPCServ created condition fires both once ever (so that the x+=is only called once) and every time a player enters (so that timeout doesn't die and the variables stay defined)
I only used the little scriptlet Kaimetsu made for a stationary effect...just log onto my PW and go through the character creation stuff, you'll see it
__________________
Reply With Quote
  #23  
Old 08-31-2002, 03:50 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Tyhm

Don't believe me? Put a warp in your level to another level, and vice versa. When you reenter, everything goes plotz.
Oh, you were talking to the other guy...? It's helpful to quote the post you're addressing.
__________________
Reply With Quote
  #24  
Old 08-31-2002, 11:07 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Didn't look at your original, but the quoted passage, with the if(created) stuff, certainly won't work on a Classic-style server, and I can't fathom it working serverside either.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
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 03:46 PM.


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