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.

Newcomers DBPro Corner / enemy getting attack - where do i place the code?

Author
Message
Salsa
20
Years of Service
User Offline
Joined: 21st Sep 2003
Location:
Posted: 22nd Sep 2003 20:07
After i have the control for character in my game, where would i place
enemyhealth=150 ?
Would i place it straight under the control_enemy ?

so that when it comes to the collsision for the caracter
if attacking=1
if object collision (character,enemy)
play sound (file)
enemyhealth=-30
Also would i need something like this underneath it
if enemyhealth=0
play sound (file)

???
Andrew
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: United Kindom (what makes it important?)
Posted: 22nd Sep 2003 21:19
I would place it right under although it depends on what game you are making?
Yes this is all correct but the last part of the code

This would go underneath the part after the enemy attacks and what it does, look at the Tutorials for the alien game (but it's fps)

I know my codes - i am now more advanced with DBP-
Ask me any question (um not to do with online though :0)

Login to post a reply

Server time is: 2024-09-21 01:16:54
Your offset time is: 2024-09-21 01:16:54