Page 1 of 1

help needed !!!

PostPosted: Wed Jan 31, 2007 7:39 pm
by mr-game
im making a space shooting game and one of the pick ups is a shield but i want ti to be destoryed after 3 hits of the enemy i know how to make it kill the enemy on contact but how do i make it get destoryed after 3 hits
ty for help

i would like the 3 hits and destory the shield or...
make the shield last for 5 seconds the get destroyed or....
anyone whos good at hp bars tell me how to give the shield a hp bar that dies after 3 hits and i will just hide the hp bar

the pic is of my game with the shield ( blue ring ) up

Re: help needed !!!

PostPosted: Wed Jan 31, 2007 8:27 pm
by makslane
mr-game wrote:i would like the 3 hits and destory the shield


Create a variable hits (actor, integer)
On collision event of shield actor, put:

Code: Select all
hits++;
if(hits >= 3)
{
   DestroyActor("Event Actor");
}


make the shield last for 5 seconds the get destroyed


What?

PostPosted: Wed Jan 31, 2007 8:28 pm
by makslane
BTW, use a more descriptive subject!

PostPosted: Wed Jan 31, 2007 9:35 pm
by mr-game
like when i get the shield put up it only lasts for 5 seconds then goes

PostPosted: Thu Feb 01, 2007 12:58 am
by makslane
1) On Create Actor event of the shield, create a 5s timer
2) On Timer event of the shield, put:

Code: Select all
DestroyActor("Event Actor");