Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
1 registered members (AndrewAMD), 599 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
detect my entity model #323244
05/12/10 15:21
05/12/10 15:21
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
is there any instruction to get the name of the model of an entity?

something like:

Quote:
action Car_Action()
{
STRING Model_Name;

Model_Name = What_Model_Does_This_Ent_Have(me);

if(Model_Name == "Car25.mdl")
{
do something...
}

}

void main()
{
ent_create("Car25.mdl",nullvector,Car_Action);
}


Is there any instruction that does something like that?
What_Model_Does_This_Entity_Have(ENTITY*);


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: detect my entity model [Re: Carlos3DGS] #323250
05/12/10 16:21
05/12/10 16:21
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
str_for_entfile(string,entity)


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: detect my entity model [Re: Carlos3DGS] #323258
05/12/10 17:34
05/12/10 17:34
Joined: Sep 2009
Posts: 987
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 987
Budapest
Another tip:
Code:
// define the name string as a skill
#define objname	skill10
...
// create the entity and assign the name
entityname = ent_create(myfile, mypos, whatever);
entityname.objname=str_create("");
str_cpy((STRING*)entityname.objname,myfile);
...
// using the skill
if(str_cmpi((STRING*)entityname.objname,"Car25.mdl")==1) {
do something...
}


Naturaly, you can use your names etc.

Re: detect my entity model [Re: Superku] #323260
05/12/10 17:48
05/12/10 17:48
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
thanks! grin


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1

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