AlliedModders

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

XAT 07-09-2012 11:44

Entity question
 
Any way to create func_breakable / func_wall visible entity with custom size and material like DispatchKeyValue ? ( NOT a model )

I've created something like this but it isn't visible and touchable, in other words, dosen't exist.

PHP Code:

new entity_id create_entity("func_breakable");
    
DispatchKeyValue(entity_id"targetname""test_ent");
DispatchKeyValue(entity_id"material""2");
DispatchSpawn(entity_id);

entity_set_size(entity_idFloat:{ -20.0, -20.0, -20.0 }, Float:{ 20.020.020.0 });
entity_set_origin(entity_idblabla... some origin here); 

I can only kill it and see the death animation

PHP Code:

dllfunc(DLLFunc_Useentity_id0); 


jimaway 07-09-2012 11:54

Re: Entity question
 
you need a model or sprite to make it visible

XAT 07-09-2012 12:02

Re: Entity question
 
As i was thinking.
Thanks.

XAT 07-09-2012 12:35

Re: Entity question
 
Create entity, set it's size, give it a render ( like kRenderTransColor ), color it, but not set model.
Is this possible ?

<VeCo> 07-09-2012 12:48

Re: Entity question
 
No.
Solid brushes with textures are created on map compile-time and there is set their texture and lightmap. You can't create them in-game. You must use a model.

XAT 07-09-2012 12:52

Re: Entity question
 
Oh damn, so render applys on model not size.
Bet i can't set render on entity size defined by pev_mins, pev_maxs etc, right ?

<VeCo> 07-09-2012 12:54

Re: Entity question
 
Yes, the render is assigned to the model. Mins and maxs are only for the solid part.


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

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