Raised This Month: $ Target: $400
 0% 

'find_ent_by_class' Equivalent in FakeMeta?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 02-28-2006 , 11:49   'find_ent_by_class' Equivalent in FakeMeta?
Reply With Quote #1

I'm trying to convert this simple line of code from something that uses the engine module to something that uses the fakemeta module. However, I'm barely familiar with fakemeta at best and thus, have little idea where to begin.

Can someone show me how I'd use fakemeta to achieve the same functionality as I get by using engine?
Code:
g_mapHasBomb = find_ent_by_class(-1, "func_bomb_target");
As you can see in the code, all I'm trying to do is find out if the current map has a bomb target in it (thus presumably a bomb as well). That's it.
Brad is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 02-28-2006 , 13:10  
Reply With Quote #2

That works
Code:
g_mapHasBomb = engfunc(EngFunc_FindEntityByString, -1, "classname", "func_bomb_target");
VEN is offline
Kraugh
Senior Member
Join Date: Jan 2006
Location: barrington, ri
Old 02-28-2006 , 15:34  
Reply With Quote #3

off topic, but i'm curious as to why you are using fakemeta and not engine? fakemeta has a plethora of efficiency flaws and from what i can tell every engine equivalent is better than fakemeta.
__________________
"You can not restrain a fool from speaking, but nothing obliges you to listen."
Kraugh is offline
Send a message via AIM to Kraugh
BAILOPAN
Join Date: Jan 2004
Old 02-28-2006 , 15:57  
Reply With Quote #4

Quote:
Originally Posted by Kraugh
off topic, but i'm curious as to why you are using fakemeta and not engine? fakemeta has a plethora of efficiency flaws and from what i can tell every engine equivalent is better than fakemeta.
That is untrue... please don't spread things like this without proof. If you can come to me with proof that one method is more efficient than another, I can try to correct the problem. Until then, don't spread lies. Fakemeta is a direct port of MM/engine stuff, engine is an abstraction layer.
__________________
egg
BAILOPAN is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 02-28-2006 , 16:01  
Reply With Quote #5

The engine module, when merely enabled, ups your CPU usage without even being told to do anything. The fakemeta module, on the other hand, will sit there and patiently wait for you to tell it to do something before it reacts, thus lower CPU usage.
Brad is offline
Reply



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


All times are GMT -4. The time now is 20:18.


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