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.

2D All the way! / Need help with enemy "attack waves" are "arrays" my friend?

Author
Message
Marsekay
15
Years of Service
User Offline
Joined: 24th May 2008
Location:
Posted: 27th May 2008 23:53
So im on the stage of wanting to create my waves of enemys

im not much a fan of the drunken random enemy movement patterns etc

how do i create say 100 guys in a level with say 5 different types of enemy within that 100 each group having a different movement pattern and image

im thinking i may need arrays?

otherwise do i have to program each guy sperately?

if its arrays how do i use the array to do what i want?

Marse
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 28th May 2008 02:00
What language are you using? Basic or C++?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
waka324
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 28th May 2008 09:41
if you are using C++, I would create a structure like



and then create a c_array of that type.

Like
std::vector< enemy > enemies;
Marsekay
15
Years of Service
User Offline
Joined: 24th May 2008
Location:
Posted: 28th May 2008 20:01
Hi, im using DBP

Marse
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 28th May 2008 20:14
Quote: "Hi, im using DBP"


Sorry, then. I'm out of my field there. In C++ you can keep data and functions together in a structure so each entity has it's own private copy. Maybe DBP has similar functionality.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 28th May 2008 22:27




Simple.


I fail at life. No, really.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 3rd Jun 2008 19:47
Just have a 'group' value in the UDT, and tell the enemies to stay within a certain distance of that group.

Login to post a reply

Server time is: 2024-05-04 15:55:12
Your offset time is: 2024-05-04 15:55:12