...Welcome to Quake3World...

Be sure to visit our Editing Section
Looking for assistance in the development of a mod? Wanna Join a mod team? Checkout our Help Wanted! forum
Don't forget to checkout the Modifications Programming Forum FAQ
  Quake3World.com Forums
  Modifications Programming
  Help: World animals, like Cockroach in HL single player.

Post New Topic  Post A Reply
logon | profile | register | preferences | faq | search | game server


Email This Thread to a Friend!

next newest topic | report this topic | next oldest topic
Author Topic:   Help: World animals, like Cockroach in HL single player.
MayDay
Rookie

Posts: 49
Registered: Dec 2001

posted 03-08-2002 08:17 AM     Click Here to See the Profile for MayDay Visit MayDay's Homepage!   Click Here to Email MayDay UIN: 9343643UIN: 9343643    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
I want to have spiders running around on the floors of my level that you can squish or shoot, the insect would only need to run around and do nothing, and when you walk over it or shoot it, the spider will die. ive been thinking on how to do this, im not sure but can all this be done in the bot scripts? or would i need some code?

Anyone got some ideas or pointers on this topic please do post it, links one simmilar topics are also welcome.

TIA
MayDay

-=Hunter-Killer=-
DιgιmøяtαĻ

Posts: 1363
Registered: Aug 2000

posted 03-08-2002 09:40 AM     Click Here to See the Profile for -=Hunter-Killer=- Visit -=Hunter-Killer=-'s Homepage!   Click Here to Email -=Hunter-Killer=- UIN: 93650399UIN: 93650399    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
What I would do is create bot classes. If the bot is, lets say a spider, class then you take over the control of movement instead of going from item to item. To control spawning you could create a new flag for the spawn point entity similar to the allow bot/allow human flag.

]-[ ~ ]<


MayDay
Rookie

Posts: 49
Registered: Dec 2001

posted 03-08-2002 04:28 PM     Click Here to See the Profile for MayDay Visit MayDay's Homepage!   Click Here to Email MayDay UIN: 9343643UIN: 9343643    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Sounds complicated Hunter, been looking at the bot scripts, not much controll in those, not even move speed and couldent get it to not use weapons or not pick up some of them.

Seems it will require alot more work then i thought, thanks for the help Hunter but i dont understand what you mean but im gonna poke around in the bot codes and gonna see if i can find anything about the stuff your talking about.

ofc, any additional pointers on where to start in the code would be great.

Thanks...
MayDay

Yoda
Grunt

Posts: 52
Registered: Feb 2002

posted 03-08-2002 05:21 PM     Click Here to See the Profile for Yoda Visit Yoda's Homepage!   Click Here to Email Yoda    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
You can controll the model though.

Do the class tutorial but, have it so if you have the spider model, you have x movement and start with x weapons, have x life, and move at x speed.

Look at the class tute...

Acryl
Grunt

Posts: 53
Registered: Feb 2002

posted 03-08-2002 05:48 PM     Click Here to See the Profile for Acryl     UIN: 6509349UIN: 6509349    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Uhhh sorry .... using the botcode for such simple things is pure overkill.
A new entitytype masked as damageable with a touch function, a periodically called think function will do the job nice and smooth. Of course with proper code on the client side for drawing.

Plus for spawning just create a new entity(-type) like "roach spawner" that spawns a mapper specified number of roaches at it's origin. And cares for keeping the number of roaches in game constant.

I.e. when a roach is killed just make it spawn a new one (easy to do by setting the parent entity of each roach to the spawner which spawned it).


- Acryl

[This message has been edited by Acryl : 03-08-2002.]
Yoda
Grunt

Posts: 52
Registered: Feb 2002

posted 03-08-2002 06:57 PM     Click Here to See the Profile for Yoda Visit Yoda's Homepage!   Click Here to Email Yoda    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Just waiting for some extermintor mod to come out...

Exterminator 2000
Roach-a-licous.

2,000,000 roaches killed in 2 seconds, you have a high score... hey that wouldn't be too bad =)

JazzD
Invisible Slayer

Posts: 1202
Registered: Oct 2000

posted 03-09-2002 02:32 AM     Click Here to See the Profile for JazzD Visit JazzD's Homepage!   Click Here to Email JazzD UIN: 111621601UIN: 111621601    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Just wait till I get my monster code done , I'll write 3 or more tutorials on getting some monsters or enemies to work. Would be nice for your coak-roach.

------------------
[PR]JazzD, Team leader and lead coder of Mage Legend:Fortress of Darkness

Prsoftware at planetquake!

MayDay
Rookie

Posts: 49
Registered: Dec 2001

posted 03-09-2002 05:55 AM     Click Here to See the Profile for MayDay Visit MayDay's Homepage!   Click Here to Email MayDay UIN: 9343643UIN: 9343643    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Alot of great feedback, you tutorials sounds great JazzD.

about not using the bot code for the roach: I want it to move around and away from the players and maybe even nibble at dead player corpses, then doing it as a bot wouldent be overkill? And using bot code would take much less coding or am i mistaken.

Thanks
MayDay

-=Hunter-Killer=-
DιgιmøяtαĻ

Posts: 1363
Registered: Aug 2000

posted 03-09-2002 07:48 AM     Click Here to See the Profile for -=Hunter-Killer=- Visit -=Hunter-Killer=-'s Homepage!   Click Here to Email -=Hunter-Killer=- UIN: 93650399UIN: 93650399    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by Acryl:
Uhhh sorry .... using the botcode for such simple things is pure overkill.
A new entitytype masked as damageable with a touch function, a periodically called think function will do the job nice and smooth. Of course with proper code on the client side for drawing.

Plus for spawning just create a new entity(-type) like "roach spawner" that spawns a mapper specified number of roaches at it's origin. And cares for keeping the number of roaches in game constant.

I.e. when a roach is killed just make it spawn a new one (easy to do by setting the parent entity of each roach to the spawner which spawned it).


- Acryl

[This message has been edited by Acryl : 03-08-2002.]

True...but I'm not a mapper so the code side just kinda came to me first. Plus, with a little more code it could be possible to spawn these into any map.

]-[ ~ ]<


JazzD
Invisible Slayer

Posts: 1202
Registered: Oct 2000

posted 03-09-2002 08:06 AM     Click Here to See the Profile for JazzD Visit JazzD's Homepage!   Click Here to Email JazzD UIN: 111621601UIN: 111621601    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by -=Hunter-Killer=-:
...with a little more code it could be possible to spawn these into any map.

]-[ ~ ]<

hmm I think with less code because it's easier to let them just spawn somewhere, I did it like this with my monsters first, it was quite hard to let them be placeable in the editor.

-=Hunter-Killer=-
DιgιmøяtαĻ

Posts: 1363
Registered: Aug 2000

posted 03-09-2002 06:26 PM     Click Here to See the Profile for -=Hunter-Killer=- Visit -=Hunter-Killer=-'s Homepage!   Click Here to Email -=Hunter-Killer=- UIN: 93650399UIN: 93650399    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Randomly spawning entities out of "thin air" is not easier than creating a new entity flag. There are many, many considerations to do this effectively.

]-[ ~ ]<


JazzD
Invisible Slayer

Posts: 1202
Registered: Oct 2000

posted 03-10-2002 02:25 AM     Click Here to See the Profile for JazzD Visit JazzD's Homepage!   Click Here to Email JazzD UIN: 111621601UIN: 111621601    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
right.
Acryl
Grunt

Posts: 53
Registered: Feb 2002

posted 03-10-2002 03:35 AM     Click Here to See the Profile for Acryl     UIN: 6509349UIN: 6509349    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by -=Hunter-Killer=-:
True...but I'm not a mapper so the code side just kinda came to me first. Plus, with a little more code it could be possible to spawn these into any map.

Neither am I ... and I was talking about the code side. Creating a completely new EntityType like ET_MONSTER (or ET_ROACH in this case) isn't that much work as most people expect. And additional spawner entity needs even less coding, but ok ... if you don't care where your roaches spawn it's definitely no problem to have them spawn randomly in the map.

@Mayday:
No matter what you want them to do, an entirely new entity will suit your needs best. Using the botcode is still overkill since bots are emulating clients whose behaviour is way more complex than the one of roaches. All of the things you mentioned can be done rather easily done.

When you create a new entity type you can hook the move function for your roaches into G_RunFrame like:

code:

if ( ent->s.eType == ET_ROACH ) {
G_RunRoach( ent );
continue;
}

- Acryl

All times are PST (US)

next newest topic | report this topic | next oldest topic

Administrative Options: Stick Topic | Close Topic | Archive/Move | Edit Subject | Edit Earmark | Delete Topic
 
Post New Topic  Post A Reply
Hop to:
URL box:

Contact Us | Quake3World.com


Ultimate Bulletin Board 5.45c