Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / how do give each eneamy live

Author
Message
agentblob
22
Years of Service
User Offline
Joined: 28th Feb 2003
Location:
Posted: 30th Mar 2003 12:58
how can i give each eneamy 5 bits of life? and when you shoot them this live goes down??
thanks
AsriCE
22
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Brunei
Posted: 30th Mar 2003 13:01
Try this...

At the top of your program put,
Life=5

In your loop,
If Shoot=1 Then Life=Life-1

Asri CE Crew

Anak Brunei!
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 30th Mar 2003 13:08
dim lives(num_enemies)

for x=1 to num_enemies
lives(x)=5
next x

do
...
for x=1 to num_enemies
if shoot(x)=1 then lives(num_enemies)=lives(num_enemies)-1
if lives(x)=0 then enemy=dead
next x
...
loop

Why the hell'd you ask me for crying out loud!?!

Login to post a reply

Server time is: 2025-05-15 22:17:13
Your offset time is: 2025-05-15 22:17:13