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.

Dark Physics & Dark A.I. & Dark Dynamix / How do i make classes for enemys

Author
Message
OnQue Int
16
Years of Service
User Offline
Joined: 8th Jun 2007
Location:
Posted: 29th Dec 2008 19:31
Ok, i have let say

load object "enemy.x",ene


now how can i load more then one, where i can use the varible (ene) for all of them because if i use AI how does the ai know which is which and then how can i position each one?

I'm pretty far into my game(FPS) that now i need to learn ai and how to make i guess they would be called classes

right now i have to enemys and im using ENE and ENE2 i dont want to have to code for every enemy.. i want 10 different types of enemy so i guess i would need 10 different classes...

can someone help please
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 1st Jan 2009 02:46
This is the wrong section to post this question in, it should be in the Newcomers Corner, but I'll answer anyways. What you need to learn are arrays and UDT's (User-Defined Types). They will allow you to have multiple "slots" and variables for an entity. You should be able to search the forums for tutorials and plenty of information on them, but here's a short example of them:

That will set up and define variables regarding 3 enemies. If you want you can add me on MSN as gamedev06 at hotmail dot com or on AIM as gamedev06 at aol dot com and I'll help you out and explain more.


Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 1st Jan 2009 20:00 Edited at: 1st Jan 2009 20:05
Don't know if it was you, but someone named Chris something tried to add me on MSN and my IM decided to crash when I was about to accept, so you'll have to try to readd me or just tell me what to add on here.


Login to post a reply

Server time is: 2024-05-18 07:14:18
Your offset time is: 2024-05-18 07:14:18