Raised This Month: $ Target: $400
 0% 

Creating an entity messes up


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VEN
Veteran Member
Join Date: Jan 2005
Old 01-03-2007 , 01:21   Re: Creating an entity messes up
Reply With Quote #1

I think you wanted to make it like that:
Quote:
ent = create_entity("info_tfdetect")
Also in keyvalue hook check for entity validity and necessary classname key.
VEN is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 01-03-2007 , 02:37   Re: Creating an entity messes up
Reply With Quote #2

Can't you just do:

switch(keyname)
{
case "blah": do_something(...)
case "blah2": do_someting(...)
}
stupok is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 01-03-2007 , 14:41   Re: Creating an entity messes up
Reply With Quote #3

Quote:
Originally Posted by VEN View Post
I think you wanted to make it like that:

Also in keyvalue hook check for entity validity and necessary classname key.
Hi, I have tried that too and everything still spawns at (0 0 0).

I don't understand why every entity is spawning there anyway? There isn't anywhere in the code that I can see to have everything spawn there, only the "info_tfdetect".

Maybe this code could be causing that, I don't know why it would be though. It's all I can think of.
Code:
public forward_keyvalue(ent2, kvdid) {     if(ent2)     {         new keyname[128];                 get_kvd(kvdid, KV_KeyName, keyname, 127);                 /* ------- This is the cause maybe? ------- */         if(equal(keyname, "origin"))         {             set_kvd(kvdid, KV_Value, "0 0 0");         }         /* ---------------------------------------- */     }         return FMRES_IGNORED }
hlstriker 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 22:28.


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