Raised This Month: $ Target: $400
 0% 

More entity woes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mugwump
Senior Member
Join Date: May 2004
Old 06-22-2004 , 13:46   More entity woes
Reply With Quote #1

As I posted in another thread I have been trying to create a dummy player entity like a wax figure, I have tried using similar code to that used in the sh_beyonder superhero as well as the code in the Ent Copying thread posted here earlier.

I have no problem with creating the entity, settings its attributes and its origin, in the case of the beyonder like example it does what it should, moves when I move, etc.My problem is no matter what I try the only model I can get to stick on the entity is the first counter-terrorist model.

All of the CS models are precached in plugin_precache().

If I explicitly try this:
entity_set_model(myentity, "models/player/terror/terror.mdl")

it either spawns the entity with no model (its not visible) or that first CT model appears.

I have also tried this approach:
entity_get_string(id, EV_SZ_model, arg, 63)
entity_set_string(myentity, EV_SZ_model, arg);

to copy the model I currently am using, it only displays that first CT model.

Anyone have any suggestions for what might be wrong or what I should try, this is getting frustrating.

Thanks,
Mugwump
Mugwump is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 06-22-2004 , 14:22  
Reply With Quote #2

from the beyonder code

Code:
new model[32],modelchange[128] get_user_info(id,"model",model,31) format(modelchange,127,"models/player/%s/%s.mdl",model,model) client_print(id,print_chat,"You Spawned A Fake with model %s",model) //DEBUG MESSAGE entity_set_model(beyonder[id], modelchange)
__________________
My Plugins

Got ??
AssKicR is offline
Mugwump
Senior Member
Join Date: May 2004
Old 06-22-2004 , 14:49  
Reply With Quote #3

Yep, I tried that Asskickr. After trying and failing with so many deviations I tried a version with just your beyonder_makeil routine code and it would only spawn for me an invisible fake.... No idea what may be wrong.

Mugwump
Mugwump is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 06-22-2004 , 16:54  
Reply With Quote #4

did you precache the models
__________________
My Plugins

Got ??
AssKicR is offline
Mugwump
Senior Member
Join Date: May 2004
Old 06-22-2004 , 17:26  
Reply With Quote #5

Yes, all models were pracached, I have this plugin_precache() routine:

public plugin_precache(){
precache_model("models/player/leet/leet.mdl")
precache_model("models/player/arctic/arctic.mdl")
precache_model("models/player/guerilla/guerilla.mdl")
precache_model("models/player/terror/terror.mdl")

precache_model("models/player/gign/gign.mdl")
precache_model("models/player/sas/sas.mdl")
precache_model("models/player/gsg9/gsg9.mdl")
precache_model("models/player/urban/urban.mdl")

precache_model("models/player/vip/vip.mdl")

return PLUGIN_CONTINUE

}

I am really confused on this one, I even tried your sh_beyonder.sma file verbatim and even that wouldn't produce the desired results ...

Mugwump
Mugwump is offline
Ingram
Veteran Member
Join Date: May 2004
Old 06-22-2004 , 19:23  
Reply With Quote #6

lol, u used my code from the ent copying thread?
thats the problem,

players have a lot more settings (settings for ent) i only included the ones to copy an object like a box (func_wall). bailopan pointed this out in the next post

i had a plugin to list all the settings for an ent u r looking at, but i didn't realize i had put it in my complied folder until after i complied and if anyone else has done this, it disappears lol. Anyways i got nothing better to do, so i guess i can remake this plugin
Ingram is offline
Mugwump
Senior Member
Join Date: May 2004
Old 06-22-2004 , 20:19  
Reply With Quote #7

jj, the thing of it is I had more luck when I used the code you posted as the basic idea and modified for my needs from there, at least then I could get entity to spawn and mimic my actions, though it always spawned with the same CT model. When I tried to use an alternative approach using the sh_beyonder code as an example I couldn't even get an entity to appear, it reported to have been created but it was not visible to me ...


I'd be interested in seeing the script you mention to dump the entity variables, in the event you write it again.

Mugwump
Mugwump is offline
Ingram
Veteran Member
Join Date: May 2004
Old 06-22-2004 , 23:44  
Reply With Quote #8

sry i kinda rushed this (but i got a header in). My server began to fill up so i decided to play, all work and no play makes me go crazy. Anyways, heres the .sma

and btw, i fixed those warnings from the pm. (stupid me)
Attached Files
File Type: sma Get Plugin or Get Source (entinfo.sma - 1335 views - 14.4 KB)
Ingram is offline
Mugwump
Senior Member
Join Date: May 2004
Old 06-23-2004 , 00:25  
Reply With Quote #9

Excellent, thanks, will have a look at this soon.

Mugwump
Mugwump 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 14:37.


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