Page 1 of 3

Dying problems

PostPosted: Sat Jan 27, 2007 9:30 pm
by TaumCross
How would i create my main actor again after he dies? like with lives, how do i make it so that he has like 3?

PostPosted: Sat Jan 27, 2007 9:38 pm
by Sgt. Sparky
allright, first you need to make a var (integar) called Lives,
at the start
Code: Select all
 Lives = 3;
for the view actor, the when the main actor dies
Code: Select all
Lives -= 1;
and on the draw actor event of the view,
Code: Select all
if (lives < 0)Destroy Actor("Player");

to have 1 ups(more lives) on the collision event where the main actor collides with the 1up actor it destroys the collide actor :D
and on the destroy actor Event of the 1up actor have this
Code: Select all
Lives -= 1
to display the amout of lives left have an actor called "LivesText" on the draw actor event of lives text have this
Code: Select all
textNumber = Lives;
but first you must make livestext a text actor by adding a font, and seeting the text to 0 :D if you need any more help just post it :D I hope that helps :)

PostPosted: Sat Jan 27, 2007 9:43 pm
by TaumCross
ok I have another question. Where do i fin this var, integar thing?

PostPosted: Sat Jan 27, 2007 9:53 pm
by Sgt. Sparky
yeah, I kinda' new. I have only been doing it for a few months(bout' 6) :D
as for the integer thing go to script and click on the variables not variables/funtions so that it vomes up with a little window that lets you make variables and integer is the default one :D

PostPosted: Sat Jan 27, 2007 10:59 pm
by TaumCross
sorry to bother you about this but here i go!
so i create a "Lives" variable integar, What do i set it to, all that happens is closing the variable window, (gay!!). Do i set this all to my main actor?
This time can you explain this all so an idiot like me can understand?

Sorry to nag, i really want to set this up right.

PostPosted: Sat Jan 27, 2007 11:09 pm
by Game A Gogo
ok, go on the button var, founded on the Script Window.
2nd, click on Add
3rd Enter the name Lives
4rt, Click on Add, and your var is set up.

And for making the livees go up, it should be this:
Code: Select all
Lives+=1;
not
Code: Select all
Lives-=1;

PostPosted: Sat Jan 27, 2007 11:47 pm
by Sgt. Sparky
I did not mean to do that :? I always use on the create actor event(view)
Code: Select all
Lives = 3;
I do not set arrays cus' somtimes I want to change the value in an easier way :D but what part do you want me to describe to you better TaumCross? :) :o :D

PostPosted: Sun Jan 28, 2007 12:32 am
by TaumCross
I just need to know how all of the lives are set up and menu and stuff like that...

PostPosted: Sun Jan 28, 2007 12:40 am
by Sgt. Sparky
okay, The lives: on the create actor event for the view actor(click on the view actor[whitebox]and click add then create actor then click script editor)on that event have this
Code: Select all
Lives = 3;

and when the main actore dies have this(destroy actor script editor)
Code: Select all
Lives -= 1;
now when he hits a power up and the power up dies have this(destroy actor event for power up)
Code: Select all
Lives += 1;
I hope that helps, If you still need help just let me know :D oh,and for the recreating the main actor have a spawn point actor that recieves an activation event from the main actor when the main actor dies :D (destroy actor event)
Code: Select all
SendActivationEvent("SpawnPoint");

on the activation event for the spawn point: create actor Main actor. :D
that should cover it all

PostPosted: Sun Jan 28, 2007 1:52 pm
by TaumCross
I have a few small questions, where do i stick the spawn point? and i need to know if i accually have lives, so how do i show my live bar? (ok so i have some more questions...) I wanna know how to make a menu so i can have cool options. I need to know how to do projectiles. I'm making a halo game so i need health help now (sorry...). I need to give enemies health, and i also need to have a story line so if you could show me, i will put you in my production help section that I wanna make. :D

PostPosted: Sun Jan 28, 2007 8:15 pm
by Sgt. Sparky
stick the spawn point where you want him to spawn :D I will not be able to post all of that today, let me make a Demo :D
as for displaying health, Have an actor called: LovesText, set the view as thqat actor's parent. for the draw actor event of LivesText use this
Code: Select all
textNumber = Lives;
I hope tjhat helps untill I make the Demo :)
by the way wich version od GE do you have? the newest one? I will have the Demo in a day or two :D

PostPosted: Sun Jan 28, 2007 9:09 pm
by TaumCross
could I try one of your games?

PostPosted: Sun Jan 28, 2007 11:44 pm
by Sgt. Sparky
sure! go to demo page(Demo Forum page), I have 2 there, or 3
:D stickManJumper(V1.8 ), Snake2007(V1.4), and music maker(V1)
I may soon have painter there :D

PostPosted: Sun Jan 28, 2007 11:59 pm
by Game A Gogo
here is a small demo i've made.
A LONG WHILE AGO!

Please, don't take any GFX!

PostPosted: Mon Jan 29, 2007 3:48 pm
by Troodon
Game A Gogo wrote:here is a small demo i've made.
A LONG WHILE AGO!

Please, don't take any GFX!


//What's GFX?