Dying problems

Game Editor comments and discussion.

Dying problems

Postby TaumCross » Sat Jan 27, 2007 9:30 pm

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?
User avatar
TaumCross
 
Posts: 9
Joined: Sat Jan 27, 2007 3:30 pm
Location: were i live
Score: 0 Give a positive score

Postby Sgt. Sparky » Sat Jan 27, 2007 9:38 pm

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 :)
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

Postby TaumCross » Sat Jan 27, 2007 9:43 pm

ok I have another question. Where do i fin this var, integar thing?
User avatar
TaumCross
 
Posts: 9
Joined: Sat Jan 27, 2007 3:30 pm
Location: were i live
Score: 0 Give a positive score

Postby Sgt. Sparky » Sat Jan 27, 2007 9:53 pm

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
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

Postby TaumCross » Sat Jan 27, 2007 10:59 pm

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.
User avatar
TaumCross
 
Posts: 9
Joined: Sat Jan 27, 2007 3:30 pm
Location: were i live
Score: 0 Give a positive score

Postby Game A Gogo » Sat Jan 27, 2007 11:09 pm

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;
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 Sgt. Sparky » Sat Jan 27, 2007 11:47 pm

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
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

Postby TaumCross » Sun Jan 28, 2007 12:32 am

I just need to know how all of the lives are set up and menu and stuff like that...
User avatar
TaumCross
 
Posts: 9
Joined: Sat Jan 27, 2007 3:30 pm
Location: were i live
Score: 0 Give a positive score

Postby Sgt. Sparky » Sun Jan 28, 2007 12:40 am

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
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

Postby TaumCross » Sun Jan 28, 2007 1:52 pm

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
User avatar
TaumCross
 
Posts: 9
Joined: Sat Jan 27, 2007 3:30 pm
Location: were i live
Score: 0 Give a positive score

Postby Sgt. Sparky » Sun Jan 28, 2007 8:15 pm

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
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

Postby TaumCross » Sun Jan 28, 2007 9:09 pm

could I try one of your games?
User avatar
TaumCross
 
Posts: 9
Joined: Sat Jan 27, 2007 3:30 pm
Location: were i live
Score: 0 Give a positive score

Postby Sgt. Sparky » Sun Jan 28, 2007 11:44 pm

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
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

Postby Game A Gogo » Sun Jan 28, 2007 11:59 pm

here is a small demo i've made.
A LONG WHILE AGO!

Please, don't take any GFX!
Attachments
Health Bar.zip
health bar
(360.45 KiB) Downloaded 267 times
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 Troodon » Mon Jan 29, 2007 3:48 pm

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?
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

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron