AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity problem... (https://forums.alliedmods.net/showthread.php?t=17838)

LynX 09-10-2005 07:36

Entity problem...
 
Allright, I need a fix for this code >_<

1. I need that the entity isn't turned around by 90 degress above his legs...
2. I need that when its spawned its turned in direction player is looking, so its looking and is turned on same direction where player is..

Code:
    cookie[id] = create_entity("info_target")     new Float:Origin[3]     pev(id, pev_origin, Origin)     engfunc(EngFunc_SetOrigin, cookie[id], Origin)     new Float:Min[3] = {-42.0, -42.0, -128.0}     new Float:Max[3] = {42.0, 42.0, 128.0}     engfunc(EngFunc_SetSize, cookie[id], Min, Max )     entity_set_model(oozaru[id],"models/player/cookie/cookie.mdl")     entity_set_int(cookie[id], EV_INT_sequence, 25 )     entity_set_float(cookie[id], EV_FL_frame, 0.0 )     entity_set_float(cookie[id], EV_FL_framerate, 1.0 )

XxAvalanchexX 09-10-2005 13:10

Whoops, you forgot to change one of your oozaru's into cookie's (entity_set_model)! There goes the whole idea of masking what you were creating.

I'm pretty sure that FakeMeta is a piece of trash except in things that the Engine can't already do, because of extra type checking and things, so I'd use the Engine alternatives (especially for pev).

Anyway, onto the problem. This is what I did for some of my roleplaying plugins. I'm not sure exactly what the values should be but this centers the model's upper boddy:

Code:
entity_set_byte(npc_ent,EV_BYTE_controller1,125); entity_set_byte(npc_ent,EV_BYTE_controller2,125); entity_set_byte(npc_ent,EV_BYTE_controller3,125); entity_set_byte(npc_ent,EV_BYTE_controller4,125);

As for the angles, just grab the player's current angles and set the entity's angles to those.

LynX 09-10-2005 14:53

XD

You caught me ^^

I'm making a Oozaru plugin for Earth's Special Forces mod ^^
I just needed that fix and its done now ^^

Thanks avalanche ^^

Greenberet 09-10-2005 16:28

one question lynx:
why do you copy each idea from evm?

XxAvalanchexX 09-10-2005 20:34

If you want to start an argument do it via the forum's private messaging or a third-party messaging service.

LynX 09-12-2005 14:11

?

I'm not doing that...
lol...

Its just a fun plugin for ESF...


All times are GMT -4. The time now is 14:28.

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