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 / how can i load the enemy

Author
Message
Neotech
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 13th Jul 2005 06:56
in most games you'll notice that you have like two of the same exact models fighting you
now can i have two or three enemy by just one load object
or would i have to load object "same.x",1
load object"same.x",2
aks74u
20
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: arizona
Posted: 13th Jul 2005 08:16
you could use the clone object command

Over And Out.
Neotech
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 13th Jul 2005 08:39
once i clone it how can i manipulate it like the original
since there both of diffrent name how can they share the same ai code
unless there is a way to give the object the same varible in function mabey ..
any ideas.... thanks,
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 13th Jul 2005 20:30
Put the AI-code in a function and run it on both enemies.

Immunity and Annihalation makes Immunihalation...
Neotech
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 13th Jul 2005 23:09
Sven ok so when i load the same enemy if theres 4 of the same charater do i have toload each one with a diffrent var.:

load object "enm1.x",1
load object "enm2.x",2
so on and so on?
aks74u
20
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: arizona
Posted: 14th Jul 2005 03:37
is enm1 and emn2 totally different models?

if they are your code is correct.

you could make an array ,too

Over And Out.
Neotech
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 14th Jul 2005 06:26
they are the same model
James Morgan
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location: Behind you
Posted: 14th Jul 2005 07:50 Edited at: 14th Jul 2005 07:52
Then load object one then use the clone object command.
In your function, rather than editing object 1 or 2, edit object obj and set obj to the correct value. You can also use an array to handle the object number:

However, user defined types would be better than an array:


This way you can use the UDT array enemy(i) to hold its health, name, object number (ID) and anything else you require. Of course this will only work if you use DBP not DBC

Hello!
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 14th Jul 2005 09:46
In dbc, you can just do this.


This will load 5 enemies to the variable 'enemy', then place them randomly between the coordinates given.

Enjoy Life while your still alive.
Enjoy a recees anytime!

Login to post a reply

Server time is: 2024-11-27 22:44:23
Your offset time is: 2024-11-27 22:44:23