SFML community forums

Help => Graphics => Topic started by: vicer1234 on May 17, 2011, 12:37:26 am

Title: freezing effect
Post by: vicer1234 on May 17, 2011, 12:37:26 am
Hi,
    I am making a 2d game in which i want to implement a gun, which has the effect to make the character appear like frozen.

I am having doubt about how to show this effect. Do i have to keep a track to check what type of bullet is been used,when hit by a frozen type, the animation shows that the character is freezing?

In order to implement it programmatically like a simulation effect, how should i approach it.??

All suggestions are welcome
Title: freezing effect
Post by: Fouf on June 02, 2011, 06:05:10 pm
have your character class / struct carry a boolean value called something such as isFrozen or Frozen, and if they are frozen, you could maybe make them brighter? maybe change thier image with a frozen one? Do not process any more movement functions from the player if they are frozen.. so something like

Code: [Select]
if(!player->isFrozen && player->isAlive)
     updatePosition

etc...