![]() |
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. |
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.
|
Re: Re: Image Effects!
Quote:
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 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 :) |
1 Attachment(s)
Sorry, forgot to post a screenshot of what it looks like (or what I've got so far using ~50 NPCs :x)
|
1 Attachment(s)
I'm not sure if I know what you're doing. Something like this?
|
Quote:
You hit it dead center! *dies* Might I recieve permission to use this on my PW? |
Quote:
|
1 Attachment(s)
Quote:
I've had a little fun manipulating it...very neat :eek: |
'Theif'? You sad, sad little man.
|
Quote:
|
Quote:
|
yup lol btw koni like your sig
|
Quote:
|
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. :D |
AAAAAAAAAAAAAAAAAAAAAA!
GODAWFUL CODING! *dies* |
Quote:
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. |
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. |
R0bin: Who said i wanted it online?
If people decide to use it in their levels, they can fix it themselves. |
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) |
Quote:
|
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)
|
Quote:
|
Quote:
|
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.
|
| All times are GMT +2. The time now is 01:56 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.