Cloning Q's

Game Editor comments and discussion.

Cloning Q's

Postby Oman » Tue May 08, 2007 11:00 pm

I have a enemy that shoots bullets. When the bullets hit the player it sends an Activation event to my health. the activation event tells my health bar to [animpos -- ;] lower one animation.

However the enemy creates the bullet on a timer. every 1 second or so it creates a bullet. When my player hits the first bullet my health lowers correctly. But when i hit the 2nd, 3rd, 4th... bullet it doesnt lower. When i check the activation event, it says it only works on bullet.0,

does every bullet created count as a new clone?
If so, how do i get my activation event to activate on every bullet instead of just bullet.0
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Postby d-soldier » Tue May 08, 2007 11:35 pm

What send the activation event? Is it the player (on collision), or the bullet (on collision). I dont think clones cary the same activation event line as the master actor. If you have an activation event from the player (on collision with bullet) to the healthbar, that should be fine... not the bullet.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Wed May 09, 2007 2:06 am

d-soldier wrote:What send the activation event? Is it the player (on collision), or the bullet (on collision). I dont think clones cary the same activation event line as the master actor. If you have an activation event from the player (on collision with bullet) to the healthbar, that should be fine... not the bullet.

there is no need to use activation events at all,
just use a global variable. :)
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

Re: Cloning Q's

Postby Caaz Games » Wed May 09, 2007 2:34 am

Oman wrote:I have a enemy that shoots bullets. When the bullets hit the player it sends an Activation event to my health. the activation event tells my health bar to [animpos -- ;] lower one animation.

However the enemy creates the bullet on a timer. every 1 second or so it creates a bullet. When my player hits the first bullet my health lowers correctly. But when i hit the 2nd, 3rd, 4th... bullet it doesnt lower. When i check the activation event, it says it only works on bullet.0,

does every bullet created count as a new clone?
If so, how do i get my activation event to activate on every bullet instead of just bullet.0
I wouldn't use activation events, or global thingy. i would use my way , i forgot the link so type the words in the search "Easy Way To Make A Health Bar"
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby Oman » Thu May 10, 2007 12:23 am

The bullet sends the activation event.

I will try all ur ideas now. :)
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Postby Oman » Thu May 10, 2007 12:29 am

kk. i used caaz's way... i didnt know you could do

health.animpos -- ;

Thx for all ur ideas :D
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Postby Caaz Games » Thu May 10, 2007 4:19 am

you can use an actors name before any variable to make that actor do what ever the variable, like this
Code: Select all
Player.animpos++;
and all kinds of stuff
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby Sgt. Sparky » Thu May 10, 2007 4:25 am

__CAAZ__ wrote:you can use an actors name before any variable to make that actor do what ever the variable, like this
Code: Select all
Player.animpos++;
and all kinds of stuff

not just ++ and --,
but += whatever number or value. :D
(-= *= and /= to!)
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


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron