Restore life

Game Editor comments and discussion.

Restore life

Postby Azou » Thu Nov 01, 2007 3:56 pm

HHHIIIIII!!!! :D I post this topic to ask how to makea "restor life"? Likeif sangoku takes a hamburger,he'll recover 25 percents of his lif :lol: :D e?
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Restore life

Postby Kalladdolf » Thu Nov 01, 2007 4:55 pm

you have the variable "life".
sangoku -> collision -> any side of hamburger -> script editor ->
Code: Select all
life = life + 25;


:D
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Restore life

Postby Azou » Thu Nov 01, 2007 5:05 pm

:D :D Work::thanks
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Restore life

Postby Troodon » Sat Nov 03, 2007 10:27 pm

You asked how to increase health with 25% didn't you?
Health += 25 just adds 25 to your health. If you want to have it 25% bigger, you can use:
health = health * 1.25;
:D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Restore life

Postby Azou » Sun Nov 04, 2007 3:29 pm

Thanks very much!! It's work :mrgreen:
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Restore life

Postby Troodon » Sun Nov 04, 2007 4:54 pm

No problem. If you have any other questions about variables, just ask. :D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Restore life

Postby Azou » Sun Nov 04, 2007 5:14 pm

Ho,Tekdino,i know that you were preparing your games,because you stay long time without connected in the forum,weren't you?? :wink:
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Restore life

Postby Troodon » Sun Nov 04, 2007 5:21 pm

I wish I could work on my games. But no, I don't have very much time for my games because I'm so busy with other things. :wink:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Restore life

Postby Kalladdolf » Wed Nov 07, 2007 5:39 pm

talkin' about busy, we are writing a latin test tomorrow, an english exam the day after,
on monday a history exam and after that and a latin vocabulary test after that :o :roll:
I have to practise 40 minutes piano a day, the way to my school takes 1 and a half hours,
etc...

SO U GUYS NOW THINK OF HOW I MANAGE TO BE ONLINE ONCE A DAY :!:
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Restore life

Postby Bee-Ant » Thu Nov 08, 2007 10:03 am

use this to make your health increased smoothy : (It's looks more beautiful, i'm sure :D )

Player>CollisionEvent>Hamburger>CreateTimer>StopIncrease>2000 ms, periodic, 1 time

Player>CollisionEvent>Hamburger>CreateTimer>Increase>50 ms, periodic, unlimited

Player>Timer>Increase>ScriptEditor>
Code: Select all
health++;

Player>Timer>StopIncrease>ScriptEditor>
Code: Select all
DestroyTimer("Increase");

Hamburger>Collision>PLayer>DestroyActor>EventActor


Just set your "StopIncrease" timer until you get 25% of increased live... :D
maybe 1000 ms, 1500 ms, etc... :D
Hope help
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Restore life

Postby Azou » Sat Nov 24, 2007 12:35 pm

Well it works!But can you tell me how to make that,when the character is punching somebody,the energy is restored?? :D
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Restore life

Postby j2graves » Sat Nov 24, 2007 1:54 pm

r u using my "touching" variable?
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: Restore life

Postby Bee-Ant » Tue Nov 27, 2007 6:04 am

Ah..it's too easy... :D :D

Player>CollisionEvent>Enemy>ScriptEditor>
Code: Select all
if(attack==1)
{
    health++;
}


Player>KeyDown>"WhateverKey">ScriptEditor>
Code: Select all
if(right==1)
{
    ChangeAnimation("EventActor","PunchRight",FORWARD);
    attack=1;
}
if(right==0)
{
    ChangeAnimation("EventActor","PuchLeft",FORWARD);
    attack=1;
}


AnimationFinish>PuchRight>ScriptEditor>
Code: Select all
ChangeAnimation("EventActor","StopRight",FORWARD);
attack=0;


AnimationFinish>PuchLeft>ScriptEditor>
Code: Select all
ChangeAnimation("EventActor","StopLeft",FORWARD);
attack=0;



Sooooooooooooooo.............simple right? :D :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron