AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   a fm questition? (https://forums.alliedmods.net/showthread.php?t=45678)

k007 10-08-2006 19:09

a fm questition?
 
when im setting a string, model, origin, edict, int, float, size, and vector do i use set_pev? cuz i seen some engfunc const that have like orgin and model..etc

Zenith77 10-08-2006 19:43

Re: a fm questition?
 
Here is a good rule of thumb that has worked for me, if it exists as an engine function, you should use the function (like EngFunc_SetOrigin) and then set the pev[why, I don't know I've just seen a couple ppl do this) (set_pev(ent, pev_origin).

So:
Code:
engfunc(EngFunc_SetOrigin, ...); // w/e set_pev(ent, pev_origin, ...);

k007 10-08-2006 20:11

Re: a fm questition?
 
oh ty, and one more thing whats the diffrent between engfunc_CreateEntity and engfunc_CreateNamedEntity?
edit: is point_contents and EF_PointContents are the same func expect diffrent module?

Zenith77 10-08-2006 20:33

Re: a fm questition?
 
I honestly don't know.

k007 10-08-2006 20:41

Re: a fm questition?
 
it's ok i got for the first one everyone use's CreateNamedEntity i don't know why so i used it and for the second one i found out there is a engfunc called EngFunc_PointContents

teame06 10-08-2006 20:51

Re: a fm questition?
 
point_contents is the engine.

engfunc(EngFunc_PointContents, Float:What[3]); from fakemeta.inc or EF_PointContents(Float:What[3]) from fakemeta_stocks.inc

They both do the same exact thing except they are in different module. It very simple to distinguish what native belong to what module. Use the FuncWiki.

The difference between is that engfunc_CreateEntity just creates a entity and return the id. engfunc_CreateNamedEntity you have to specfiy what it going to be name ... ie info_target or hostage_entity.

Zenith77 10-08-2006 22:19

Re: a fm questition?
 
We'll, in past experince CreateEntity you have to manually call DispatchSpawn(). In other cases it just plain didn't work for me, probably due to the fact of my poor knowledge of how HL works.


All times are GMT -4. The time now is 04:53.

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