AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to remove corpses? (https://forums.alliedmods.net/showthread.php?t=192709)

vamppa 08-13-2012 10:47

How to remove corpses?
 
was wondering how would corpse entities (dead bodies) be removed a single time on the entire map?
purpose: lets say before a match starts. (this will be instead of reloading the map manually)

darktemplar 08-13-2012 12:05

Re: How to remove corpses?
 
Hook Corpse message and block it

vamppa 08-14-2012 07:56

Re: How to remove corpses?
 
wouldn't that rather prevent a corpse to appear?
I want to clear out any existing corpses once before a match starts. (f.e. in cs1.6 when a round start)
our game Half-life deathmatch

Code:

Game registered user msgs:    msgid  size
  VoiceMask                    64      8
  ReqState                    65      0
  SelAmmo                      66      4
  CurWeapon                    67      3
  Geiger                      68      1
  Flashlight                  69      2
  FlashBat                    70      1
  Health                      71      1
  Damage                      72    12
  Battery                      73      2
  Train                        74      1
  HudText                      75    -1
  SayText                      76    -1
  TextMsg                      77    -1
  WeaponList                  78    -1
  ResetHUD                    79      1
  InitHUD                      80      0
  GameTitle                    81      1
  DeathMsg                    82    -1
  TeamInfo                    83    -1
  TeamScore                    84    -1
  GameMode                    85      1
  MOTD                        86    -1
  ServerName                  87    -1
  AmmoPickup                  88      2
  WeapPickup                  89      1

  ItemPickup                  90    -1
  HideWeapon                  91      1
  SetFOV                      92      1
  ShowMenu                    93    -1
  ScreenShake                  94      6
  ScreenFade                  95    10
  AmmoX                        96      2
  TeamNames                    97    -1
  ScoreInfo                    98      9
  AllowSpec                    99      1
  Spectator                  100      2
  VGUIMenu                    101      1
  CheatCheck                  102      1
  Splash                      103      1
  Countdown                  104    -1
  Timer                      105      8
  PlayerId                    106      6
  Settings                    107    -1
  SuddenDeath                108      1
  Longjump                    109      1
  Timeout                    110      2
  PlaySound                  111    -1
  Nextmap                    112    -1
  Vote                        113    -1
  InitLoc                    114    -1
  Location                    115      7
  WhString                    116    -1
  SpikeCheck                  117    -1
  Gametype                    118      1
  StatusIcon                  119    -1
  CTF                        120      2
  AuthID                      121    -1
  CTFSound                    122      1

  MapList                    123    -1
  CTFFlag                    124

No Corpse message

DoviuX 08-14-2012 09:29

Re: How to remove corpses?
 
PHP Code:

set_msg_blockget_user_msgid"ClCorpse" ), BLOCK_SET ); 


Arkshine 08-14-2012 09:44

Re: How to remove corpses?
 
If for HL, I guess you can play with "bodyque" entity.

In this game, it creates at server starts four "bodyque" entities. The system is : when you die, it creates a fake corpses by copying some informations to this entity, then meanwhile the dead player is hidden he can respawn somewhere else. You can have 4 fake bodies at once, so this four entites are reused once a player is dead.

The related code in HLSDK :

Spoiler


I guess the most appropriate way, is to play with the origin because you don't want to remove them (created one time, and I guess you sill want to see corpses), and the next time they will be used, the origin will be overwritten.

So, before a match as your example, loop on "bodyque" entities, and set their origins to let say 9999/9999/9999

Something like that :
Spoiler

vamppa 08-15-2012 15:22

Re: How to remove corpses?
 
thanks arkshine ill have a look at that.

Quote:

Originally Posted by DoviuX (Post 1771154)
PHP Code:

set_msg_blockget_user_msgid"ClCorpse" ), BLOCK_SET ); 



Arkshine 08-15-2012 15:57

Re: How to remove corpses?
 
ClCorpse doesn't existe in HL and I've already gave you the solution above. Not sure what you're trying to do.

vamppa 08-15-2012 20:39

Re: How to remove corpses?
 
Quote:

Originally Posted by Arkshine (Post 1771165)
So, before a match as your example, loop on "bodyque" entities, and set their origins to let say 9999/9999/9999

Something like that :
Spoiler

on compiling im getting warning 213: tag mismatch, click the spoiler to see which line.

Arkshine 08-16-2012 04:38

Re: How to remove corpses?
 
Float:{ 9999.0, 9999.0, 9999.0 }

vamppa 08-16-2012 17:37

Re: How to remove corpses?
 
GFD


All times are GMT -4. The time now is 05:51.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.