.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
Looking for humans being spawned.
Old
  (#1)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Looking for humans being spawned. - 03-12-2005

I am using this to find hostages being spawned.
Code:
int Spawn_post(edict_t *pent)
{
	// are we spawning a hostage ?
	if (strcmp (STRING (pent->v.classname), "hostage_entity") == 0)
...
How do I change this to look for human players being spawned?
tx.
  
Reply With Quote
Re: Looking for humans being spawned.
Old
  (#2)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: Looking for humans being spawned. - 04-12-2005

tracking ClientConnect() or ClientPutInServer()?
  
Reply With Quote
Re: Looking for humans being spawned.
Old
  (#3)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: Looking for humans being spawned. - 04-12-2005

No, i need to catch them at Spawn_post()
Because I will be tweaking the health of humans when they respawn at round start.

I guess I can simply put in log messages and look for what is obviously humans spawning, but I thought someone might know the entity type for humans/players..
tx
  
Reply With Quote
Re: Looking for humans being spawned.
Old
  (#4)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: Looking for humans being spawned. - 04-12-2005

the entity name of players is "player". However I don't think the DispatchSpawn() function will get called at each round.
  
Reply With Quote
Re: Looking for humans being spawned.
Old
  (#5)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Looking for humans being spawned. - 04-12-2005

If this is a deathmatch mod... I guess you could just continuously poll through each player and check if they died, set a flag, wait till they aren't dead anymore, et voila they've respawned.

If it's round based..
you need to know how to catch a new round and call your function on every player after the round starts.
  
Reply With Quote
Re: Looking for humans being spawned.
Old
  (#6)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Looking for humans being spawned. - 05-12-2005

More logically, check for the time when the player entity gets

1°) teleported to another location
2°) rendered visible again

That will mean a "spawn".



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com