Jump to content

Photo

Revive on death


  • Please log in to reply
17 replies to this topic

#16 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 03 June 2010 - 02:31 AM

Err... that is because I am a dumb_ass. :\ I forgot the "Link->HP=1;" which is arguably the most important part. XD

Here, replace this:
CODE

        if( LinkHasDied() )
            {
            if( Link->Item[I_FARY1] ){
            Link->Item[I_FARY1] = false;
            Link->Item[I_BTTL1] = true;
            resurrection_counter = life;
            }else if( Link->Item[I_FARY2] ){
            Link->Item[I_FARY2] = false;
            Link->Item[I_BTTL2] = true;
            resurrection_counter = life;
            }else if( Link->Item[I_FARY3] ){
            Link->Item[I_FARY3] = false;
            Link->Item[I_BTTL3] = true;
            resurrection_counter = life;
            }else if( Link->Item[I_FARY4] ){
            Link->Item[I_FARY4] = false;
            Link->Item[I_BTTL4] = true;
            resurrection_counter = life;
            }else if( Link->Item[I_FARY5] ){
            Link->Item[I_FARY5] = false;
            Link->Item[I_BTTL5] = true;
            resurrection_counter = life;
            }else if( Link->Item[I_FARY6] ){
            Link->Item[I_FARY6] = false;
            Link->Item[I_BTTL6] = true;
            resurrection_counter = life;
            }
        }

with this:
CODE

        if( LinkHasDied() )
        {
            bool can_return = false;
            if( Link->Item[I_FARY1] ){
            Link->Item[I_FARY1] = false;
            Link->Item[I_BTTL1] = true;
            can_return = true;
            }else if( Link->Item[I_FARY2] ){
            Link->Item[I_FARY2] = false;
            Link->Item[I_BTTL2] = true;
            can_return = true;
            }else if( Link->Item[I_FARY3] ){
            Link->Item[I_FARY3] = false;
            Link->Item[I_BTTL3] = true;
            can_return = true;
            }else if( Link->Item[I_FARY4] ){
            Link->Item[I_FARY4] = false;
            Link->Item[I_BTTL4] = true;
            can_return = true;
            }else if( Link->Item[I_FARY5] ){
            Link->Item[I_FARY5] = false;
            Link->Item[I_BTTL5] = true;
            can_return = true;
            }else if( Link->Item[I_FARY6] ){
            Link->Item[I_FARY6] = false;
            Link->Item[I_BTTL6] = true;
            can_return = true;
            }
            if(can_return)
            {
                Link->HP = 1;
                resurrection_counter = life;
            }
        }


#17 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 03 June 2010 - 03:03 PM

QUOTE(Gleeok @ Jun 2 2010, 11:31 PM) View Post

Err... that is because I am a dumb_ass. :\ I forgot the "Link->HP=1;" which is arguably the most important part. XD


Hah. At least it wasn't an if(waitframe) moment... >.>


#18 Eragon615

Eragon615

    Junior

  • Members
  • Real Name:Clayton
  • Location:Texas

Posted 03 June 2010 - 08:10 PM

Ah, YES! It worked it worked it worked. I believe I owe you a great deal of thanks guys, especially you Gleeok. This puts me a great deal closer to having a workable demo completed. Just some mapping, events and a cutscene or two. Thank you, ありがと, спасибо, Danke, and even Gracias.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users