Raised This Month: $ Target: $400
 0% 

some questions about converting engine to fm


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
diamond-optic
Veteran Member
Join Date: May 2005
Old 07-06-2006 , 19:05   some questions about converting engine to fm
Reply With Quote #1

well ive started to convert a bunch of my plugins that use engine over to fakemeta.. which turned out to be a lot easier then i expected...

but as of right now theres a few problems ive ran into and cant figure out how to do the stuff thru FM...

like these two.. i have no idea what to do to make them work using fakemeta...

register_think("dod_smoke", "draw_smoke")
register_touch("dod_smoke", "*", "grenade_touch")

and then also:

VelocityByAim

.. i got velocity.. but i dont know how to do it depending on where you're aiming or whatnot...

and another one thats not a big deal.. just curious, is this one:

set_lights(light_variable)

**and also.. is it really worth converting over to fakemeta... i dont really mind the work of doing it.. but im not sure if theres really a big difference...

thanks for any help ahead of time
__________________
diamond-optic is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 07-06-2006 , 19:14   Re: some questions about converting engine to fm
Reply With Quote #2

1. The FakeMeta module is actually a direct interface into a layer that amxmodx and its modules connect to as an interface to metamod, called fakemeta. This means your interacting directly with metamod and the hl engine. Plus, from my understanding, it uses less resources. ( I hope that section was right )

2. For your think/touch problems, register_forward() with FM_Think and FM_Touch constansts.

3. A VelocityByAim() function can be found in fakemeta_utils.inc(stickied). Or you could just manually do it.

4. For your light delima, engfunc() with the EngFunc_LightStyle constant I belive.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred

Last edited by Zenith77; 07-06-2006 at 19:25.
Zenith77 is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 07-06-2006 , 19:36   Re: some questions about converting engine to fm
Reply With Quote #3

velocity_by_aim was moved into AMXX 1.75+, see vector.inc
Orangutanz is offline
diamond-optic
Veteran Member
Join Date: May 2005
Old 07-06-2006 , 20:14   Re: some questions about converting engine to fm
Reply With Quote #4

ahh cool..

thanks alot.. didnt even realize the fm forwards lmao

there was another question or two i had.. but ill get this stuff straightened out first lol..

thanks again!
__________________
diamond-optic is offline
diamond-optic
Veteran Member
Join Date: May 2005
Old 07-07-2006 , 21:05   Re: some questions about converting engine to fm
Reply With Quote #5

ok another question regarding the forwards...

say thru engine this is what I had:

register_touch("dod_smoke", "*", "grenade_touch")

grenade_touch(grenid, object) { etc.....

...so with fakemeta i would do:

register_forward(FM_Touch, "grenade_touch")

but can i just leave:
grenade_touch(grenid, object)

as it is? or do i have to do something diff for the (grenid, object) part.. and like.. how can i figure out what else i can put there for different forwards and such... i have a feeling its gonna be a simple answer lol but i cant figure it out

**EDIT**

lol cuase im an idiot.. would this be the answer to my question:

http://www.amxmodx.org/funcwiki.php?go=func&id=1005

and so on for each forward im looking for... but registering FM_Touch instead of DF_Touch...?
__________________

Last edited by diamond-optic; 07-07-2006 at 21:21.
diamond-optic is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 07-08-2006 , 03:48   Re: some questions about converting engine to fm
Reply With Quote #6

DF_*'s and EF_*'s is just a wrappers for DLLFunc_*'s and EngFunc_*'s.
PHP Code:
stock DF_Touch(const ENT_Touched, const ENT_Other)
    return 
dllfunc(DLLFunc_TouchENT_TouchedENT_Other
I'd not recommend to use such wrappers.
But if you like short and simple wrapper idea, you can use Fakemeta Utilities which mostly uses macros which is better than such stock functions since macros processed on precompiling and never "called" as additional instruction.

As about you first question, you have to check for the classname inside touch function-handler. If you want an example, look into Real Nade Drops plugin.
VEN is offline
Reply


Thread Tools
Display Modes

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 08:08.


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