.:: 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 > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Determining the surface a character is on
Old
  (#1)
two_masks
Guest
 
Status:
Posts: n/a
Default Determining the surface a character is on - 30-04-2004

Hi everyone,

Is there a good way to determine the floor texture that a character is standing on given their edict? I'd like to modify my hearing code depending on if the target is walking on carpet, tile, etc.

Thanks!

-JB
  
Reply With Quote
Re: Determining the surface a character is on
Old
  (#2)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Determining the surface a character is on - 30-04-2004

Trace a line downward and check the material type that was hit.

See the TEXTURETYPE_PlaySound() function in sound.cpp of SDK 2.3 for an example.

botman
  
Reply With Quote
Re: Determining the surface a character is on
Old
  (#3)
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: Determining the surface a character is on - 30-04-2004

No, use TRACE_TEXTURE () - it's a function from the enginefuncs

Gives you directly what you want (char pointer to texture name).



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)
 

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