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.

Author
Message
Deathstryke
18
Years of Service
User Offline
Joined: 26th Feb 2008
Location:
Posted: 19th Jul 2010 16:26
ummmm... How would i be able to create a horde of zombies without having them all be damaged when one of them takes a hit?

There are 10 kinds of people. Those who understand binary and those who don't.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Jul 2010 17:07
Track individual hit points for each zombie in an array.

Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 19th Jul 2010 17:32
clone object. You will have to make an array of a type:
type ZOMBIETYPE
HP as integer
Mesh
x as float
y as float
z as float
.... blah, blah, blah....
endtype

dim Zombie(100) as ZOMBIETYPE

load your first zombie mesh:
ZombieMeshStart as integer
ZombieMeshStart=1
Zombie(0).Mesh=ZombieMeshStart
load object "Zombie.x",Zombie(0).Mesh
make the other zombies:
for i=1 to 100
Zombie(i).Mesh=ZombieMeshStart+i
clone object Zombie(i).Mesh,Zombie(0).Mesh
next i

I may have the clone object "object to clone to","object to be cloned" part backwards, so check the help.

The fastest code is the code never written.
Zyronagon
18
Years of Service
User Offline
Joined: 6th Mar 2008
Location: USA
Posted: 20th Jul 2010 02:10
I had the same problem until I discovered arrays and the FOR-NEXT loop. Now life is much simpler.

Login to post a reply

Server time is: 2026-07-25 04:54:49
Your offset time is: 2026-07-25 04:54:49