Player Hit- Bright flash

Game Editor comments and discussion.

Player Hit- Bright flash

Postby d-soldier » Mon May 21, 2007 4:31 pm

Instead of the common transparency thing happening when the player is hit:
if(Player_Hit == 1)transp = .5;
if(Player_Hit == 0)transp = 0;
Player_HitWait -= 1;
if(Player_HitWait <= 0)Player_Hit = 0;

I've been trying to have the rgb values increased using the same variables.. but I cant seem to get the desired result... Anyone know how to make it go white, and then back???
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby dimster » Mon May 21, 2007 7:46 pm

im not sure but you could try to make it change animation when hit.
(might be worth a try)
Image
User avatar
dimster
 
Posts: 43
Joined: Sun May 13, 2007 9:55 am
Location: south of the north pole.
Score: 0 Give a positive score

Postby d-soldier » Mon May 21, 2007 8:47 pm

I have too many different animations during the actors movement, chaning the animation to something brighter would be an obvious problem... just need someone with better understanding of scripting to address how to increase the brightness through rgb values (or other way) like above with transparency.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Game A Gogo » Mon May 21, 2007 11:55 pm

GE used to be able to do this, but it would screw up cuz then, you would be stuck whit a white actor...
All I can suggest is making a mask actor?
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby DilloDude » Tue May 22, 2007 11:35 am

You cannont change the colour to white using rgb values. Depending on the colour of the actor, you may be able to alter it to dark grey. If your actor is mainly one colour, you can make it all grey-scale and change the colour if you want. You can make it completely black by setting r, g and b to zero. Or you can make it full colour, by setting them all to 255. Or somewhere in between to darken it. To make it a reddish tint, set g and b to zero. Play around with the colours until you get one you like (you may want to get the rgb values from a program like paint, because it's easier to chose a colour).
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby d-soldier » Tue May 22, 2007 3:08 pm

Yeah, thats pretty much the result I've been getting... thought i was not working the values correctly. Thanks for breaking it down for me, I'll find another way.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Tue May 22, 2007 4:56 pm

OI!!! I know!
use draw from with a canvas actor and modify values!
(make it transparent and grey[canvas actor] and make it black for the alternate flash! :D)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron