Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, 7th_zorro), 1,203 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Flashy item Effect #317810
04/02/10 17:13
04/02/10 17:13
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
Happy Birthday DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Hi Everyone!!



So its been a long time since I've requested anything, since I've been trying to learn and do everything myself - But I've come to a fork in the road -


To begin,

Has anyone ever played the original resident evil 1, 2, or 3?

well, here is a youtube video, of which shows what i am after.

http://www.youtube.com/watch?v=Zb0XSpfu_64

once you get to the statues (about 40 seconds in), you will notice the middle statue is holding a red jewel - you will also notice that it flashes, to catch the players eye.


how can i achieve this?

I understand that I am to use a sprite, but how do I animate the sprite to flash like that?


Thanks for your time!
Devon.

Last edited by DevoN; 04/02/10 17:14.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Flashy item Effect [Re: DLively] #317813
04/02/10 18:14
04/02/10 18:14
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
u dont need to animate it at all.. you can just alter its scale and alpha parameters, like:

while(my.alpha>0)
{
my.scale_x+=2*time_step; //increase scale
my.scale_y=my.scale_x;
my.aplha-=30*time_step; //fade out
wait(1);
}

ofcourse you'll need a sprite with an alpha channel..

Re: Flashy item Effect [Re: darkinferno] #317822
04/02/10 19:24
04/02/10 19:24
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
Happy Birthday DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
very good theory, Darkinferno!
I'll give that a try for sure.
Thank you!



................
any other ideas are welcome laugh


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Flashy item Effect [Re: DLively] #317970
04/03/10 22:21
04/03/10 22:21
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
I hope you dont mind a c-script; I made the exact same effect for another RE like game couple of weeks ago.

Code:
function blinkingItem() {
	you = ent_create("spark.pcx", my.x, NULL);
	you.BRIGHT = on;
	you.PASSABLE = on;
	you.transparent = on;
	
	var scaleFac = 1;
	var timerCount = 32;
	var timerWait = 0;
	
	while(me) {
		vec_set(you.scale_x, vector(scaleFac, scaleFac, scaleFac));
		vec_add(you.pan, vector(0, 0, 0.5)); // make it rotate
//		you.alpha = scaleFac * 100;
		
		timerCount -= 1;
		if(timerCount <= 0) {
			scaleFac -= 0.05;
		}
		
		if(scaleFac < 0) {
			timerWait += 1;
		}
		scaleFac = cycle(scaleFac, 0, 1);
		
		if(timerWait == 3) {
			timerWait = 0;
			timerCount = 32; // 2 second delay
			scaleFac = 0;
		}
		
		wait(1);
	}
}



Call this function on whatever item you want to shine. And also make a spark.pcx file for the flashy effect.

hope that helps!

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: Flashy item Effect [Re: Helghast] #318300
04/06/10 20:38
04/06/10 20:38
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
Happy Birthday DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Wow!
Thanks Helghast!

Ill try it out!

Looks like it should work wink grin

EDIT:
And it does, amazingly! Thanks soo much! A few alterations, and it will be 100%

Last edited by DevoN; 04/09/10 12:48.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Flashy item Effect [Re: DLively] #318302
04/06/10 20:59
04/06/10 20:59
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
it works great, cool effect. Helghast is on a roll with awesome scripting!


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: Flashy item Effect [Re: Blink] #318724
04/09/10 12:33
04/09/10 12:33
Joined: Apr 2006
Posts: 329
M
molotov Offline
Senior Member
molotov  Offline
Senior Member
M

Joined: Apr 2006
Posts: 329
Wow Helghast, that's a great script, works perfectly. Thanks!!!


Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1