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 / Making 20 bad guys

Author
Message
Evangelion
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: United Kingdom
Posted: 11th Mar 2003 14:02
Is it possible to generate 20 bady guys who are all the same, to place in a level? My idea is that the player enters the level, (made in Cartograhpy shop) kills the 20 bad guys (first person shooter) and then progreses to the next level.
I was thinking of using that green gremlin dude that comes with DB. Does anyone know how you can create this? I was wondering if it could be done using some sort of Array?
Not much time has passed but already she likes Concrete better then Grass.
Shadow
22
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 11th Mar 2003 14:15
"Is it possible to generate 20 bady guys who are all the same, to place in a level?"
- use clone object command I think.

"Does anyone know how you can create this? I was wondering if it could be done using some sort of Array?"

- You have to be more specific. What exactly do you want the array for?
Evangelion
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: United Kingdom
Posted: 11th Mar 2003 14:24
- You have to be more specific. What exactly do you want the array for?

I don't know i just thought it sounded clever?
I have no idea what so ever to make this work.

Not much time has passed but already she likes Concrete better then Grass.
Shadow
22
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 11th Mar 2003 17:12
Have you made anything yet?
- Level code?
- Shooting code?
- Collision detection?

Don't try to jump straight into it. You need to master the individual parts before you can put them together successfully.
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 11th Mar 2003 18:37
i use an array of a pre-defined type

eg:

first

type enemyinfo
alive
x
y
z
health
skill
etc, etc, etc........
endtype


then do:

dim enemy(20) as enemyinfo

then in your game do stuff like:

for count=1 to 20
if enemy(count).alive
do stuff
endif
next count
PiratSS
22
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 11th Mar 2003 18:44
Yep use arrays and types


Toughest line of codecol$=asc(left(Pcol$)),1+str$(rev)+chr(80)+left(right(mid(name$),1),1)
lcfcfan
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 11th Mar 2003 20:39
The tutorials arent that bad just do one a day or something, the later ones are buggy though and the even later ones are just confusing.

Sweet
Evangelion
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: United Kingdom
Posted: 11th Mar 2003 23:08
Have you made anything yet?
- Level code?
- Shooting code?
- Collision detection?

Yeah i have done all that, weapon cycle, nice looking levels, loading of the game (Main Menu), music, comic book style intros. Just need something to shoot at. I can use the tutorials to add the character. i was just wondering if there was code that generated 20 of them instead of writing it out 20 times. Of course either way i need code that recognises that the player has killed all 20 bad guys and will then load the next level.

Not much time has passed but already she likes Concrete better then Grass.
Shadow
22
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 12th Mar 2003 13:01
to create 20, you just use a For...Next loop

e.g.
For i=1 to 20
load object "baddieguy.x",i
Next i

To check that you killed all 20, just keep a counter of how many there are, i.e. at start make integer variable,set to 20. Decrease it once every time you kill one. When it equals 0, you've killed them all.
ibbi
21
Years of Service
User Offline
Joined: 23rd Apr 2003
Location:
Posted: 26th Apr 2003 11:17
can anyone explian the code for the tankv3/iced demo.i think that the answer you for making 20 enemies but in tank v3/iced why there is a long function to make the enimies move the same way why not is it simple that is provided in the tutorial,do answer by sending me the emailIBRAHIMIbbi@aol.com

KamaKase
22
Years of Service
User Offline
Joined: 29th Oct 2002
Location:
Posted: 26th Apr 2003 18:20
Hmmm, creating them is easy.
for t = 1 to 20
load object "enemy.x",t+100
next t
position object 101, blah blah
etc...

Then to move them you'll have to have some sort of AI.

Login to post a reply

Server time is: 2024-11-24 12:28:15
Your offset time is: 2024-11-24 12:28:15