Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,194 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
checking medel #130488
05/17/07 19:02
05/17/07 19:02
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline OP
User
tompo  Offline 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: tompo] #130489
05/17/07 19:27
05/17/07 19:27
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
How about store the vertex no. to my.skill80
or any other skill number?

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 Offline OP
User
tompo  Offline 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
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

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 Offline OP
User
tompo  Offline 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 Offline OP
User
tompo  Offline 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: tompo] #130494
05/17/07 20:33
05/17/07 20:33
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Oh! I suppose your models were stored in
the working directory not already in WED.

Anyway, it's up to you.

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 Offline
Expert
Uhrwerk  Offline
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...
Re: checking medel [Re: Uhrwerk] #130496
05/17/07 20:47
05/17/07 20:47
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline OP
User
tompo  Offline OP
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
so how to do it faster?
I'm creating my ents in real time by script not in wed

Last edited by tompo; 05/17/07 21:07.

Never say never.
Re: checking medel [Re: tompo] #130497
05/17/07 21:07
05/17/07 21:07
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
If using str_for_entfile(...) to get model file's name,
you must have it in WED before doing so, you can try it
tomorrow.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1