3 registered members (NewbieZorro, TipmyPip, 1 invisible),
19,045
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
checking medel
#130488
05/17/07 19:02
05/17/07 19:02
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
OP
User
|
OP
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
How to check what my model is?
I have a particle effect with vertex emiter by: vec_for_vertex(my.skill70,my,28); effect(some_effect, 10* time_step,my.skill70, nullvector);
I use ent_morph to change entitys models... now I want to do something like this: if(my.model == "model_1"){vec_for_vertex(my.skill70,my,28);} if(my.model == "model_2"){vec_for_vertex(my.skill70,my,59);} effect(some)effect, 10* time_step,my.skill70, nullvector);
How to check it? What my model is?
Last edited by tompo; 05/17/07 19:26.
Never say never.
|
|
|
Re: checking medel
[Re: vlau]
#130490
05/17/07 19:40
05/17/07 19:40
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
OP
User
|
OP
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
no... how to store model name? if some entity (but not player) changed his model by ent_morph how he can know what model is he using? how to tell the entity what is his model? like if(my.model == "model_1") of'couse this doesn't work... its just example what I want to do 
Never say never.
|
|
|
Re: checking medel
[Re: tompo]
#130491
05/17/07 20:04
05/17/07 20:04
|
Joined: Aug 2005
Posts: 1,558 HK
vlau
Serious User
|
Serious User
Joined: Aug 2005
Posts: 1,558
HK
|
Alright, how about add the vertex no. to your entity's name f.e. : string model1 = <monster28.mdl>; then str_trunc "28" from model1 and store it to a variable? just a thought, haven't try it. 
|
|
|
Re: checking medel
[Re: vlau]
#130492
05/17/07 20:11
05/17/07 20:11
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
OP
User
|
OP
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
nice idea  but i'm almost sure that is possibility to read model name from what WED is use or something like this  but i don't remember that function 
Never say never.
|
|
|
Re: checking medel
[Re: tompo]
#130493
05/17/07 20:20
05/17/07 20:20
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
OP
User
|
OP
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
Eureka !!!  string entname[30]; str_for_entfile (entname, you); // retrieve the file name, like "waffe1.mdl" so if(str_for_entfile(entname, me) == "model_1.mdl"){my.skill70 = 48;} I hope it'll work  will check this out tomorow 
Last edited by tompo; 05/17/07 20:24.
Never say never.
|
|
|
Re: checking medel
[Re: vlau]
#130495
05/17/07 20:37
05/17/07 20:37
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Tompo, you can do it like this, but this is the slowest of all mentioned solutions...
Always learn from history, to be sure you make the same mistakes again...
|
|
|
|