Raised This Month: $ Target: $400
 0% 

Odd double entity problem with EngFunc_CreateNamedEntity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dodsynthetic
New Member
Join Date: May 2007
Old 07-15-2008 , 22:17   Odd double entity problem with EngFunc_CreateNamedEntity
Reply With Quote #1

OK, here is a strange problem I've been dealing with the last 12 hours. Anytime I spawn a weapon entity (give player that weapon), after about 18 seconds, the place where I spawned it, another will appear and the original dropped gun will go away after 20 seconds like normal. I tested using engine also and got the same problem so I'm wondering if I'm missing something. As a sample:

Code:
wep_ent_id = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"weapon_garand"))         // Let's drop the players current weapon     client_cmd(id, "drop")     // Retrieve player's positional vector     pev(id,pev_origin,temp_player_origin)         // Set weapon vector to player's vector     engfunc(EngFunc_SetOrigin,wep_ent_id,temp_player_origin)         // Force it to drop to the ground     engfunc(EngFunc_DropToFloor,wep_ent_id)         // Make sure it thinks so it goes away on it's own     dllfunc(DLLFunc_Think,wep_ent_id)         // Spawn the ent     dllfunc(DLLFunc_Spawn,wep_ent_id)

I don't have any set_task running to create it a second time and it happens with something as simple as the above. I also can't catch this phantom weapon entity when it appears by either model or classname but still acts like a regular weapon on the ground. This was all performed on AMX v1.7, Winblows server and 1.8 on Linux. I just want this phantom to not appear or force it to leave but I've been unsuccessful so far.
dodsynthetic is offline
dodsynthetic
New Member
Join Date: May 2007
Old 07-15-2008 , 23:43   Re: Odd double entity problem with EngFunc_CreateNamedEntity
Reply With Quote #2

I was able to finally see what the odd weapon ent's IDs are with EngFunc_FindEntityInSphere. When a player touches the spawned weapon ent, it gives it to them with the same id it was made with but then a new one is created immediately after for some strange reason which is where this mystery one is coming from. I should be able to fix this issue now though. XD
dodsynthetic is offline
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 07-18-2008 , 00:24   Re: Odd double entity problem with EngFunc_CreateNamedEntity
Reply With Quote #3

That's just the nature of weapon_* entities in DOD. Treat them like the spawned bazookas and piats.
__________________
=====================================
- My Plugins -
=====================================
Vet is offline
Send a message via MSN to Vet
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 05:30.


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