3 registered members (VoroneTZ, monk12, Quad),
829
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: path_create doesnt work
[Re: Quad]
#369954
05/09/11 20:31
05/09/11 20:31
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
That's exactly what it was supposed to do. Is there anything wrong with that? From my point of view it should be:
printf("%s",tpath->chars);
I don't know what _chr exactly does, but as far as I know it is only supposed for the dll interface, isn't it?
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: path_create doesnt work
[Re: Uhrwerk]
#369983
05/10/11 09:15
05/10/11 09:15
|
Joined: May 2010
Posts: 117 Germany , Dortmund
Bone
OP
Member
|
OP
Member
Joined: May 2010
Posts: 117
Germany , Dortmund
|
Hm, the ways you show me dont work. I havent any idea. I only want that the ENTITY moves along the path with ent_movepath()
path_set(ENTITY* entity,STRING* name)
A8.13 If an empty name string is given, the string is set to the path name the entity is currently attached to
I tried that with
STRING* tpath;
STRING* tpath = "#40";
STRING* tpath; = str_create("#40");
I dont want to read something, the function shall work. The ent_movepath function need the name of a path and I dont know that name because I use path_create() Please let me know how it works. I have headache ... Wish you a nice day
|
|
|
Re: path_create doesnt work
[Re: Quad]
#370323
05/12/11 13:35
05/12/11 13:35
|
Joined: May 2010
Posts: 117 Germany , Dortmund
Bone
OP
Member
|
OP
Member
Joined: May 2010
Posts: 117
Germany , Dortmund
|
I create a path with path_create. After that i create a car and want the car move along the path which i have created with path_create. I have to use path_set with an empty string to get the pathname of the path. path_set(ENTITY* entity,STRING* name) Attaches the given entity to the path with the given name. A8.13 If an empty name string is given, the string is set to the path name the entity is currently attached to. If NULL is given for the name, the entity is detached from its previous path. I tried following
car = ent_create("mini.mdl",0,0);
STRING* tpath ="";
// and = "#40" or = str_create("") or str_create("#40")
path_set(road1.track_path,tpath);
ent_movepath(car,tpath, 5,2);
ptr_remove(tpath);
It doesnt work. road1.track_path is an ENTITY pointer to an entity attached to the path created with path_create.
|
|
|
Re: path_create doesnt work
[Re: Spirit]
#370348
05/12/11 15:49
05/12/11 15:49
|
Joined: May 2010
Posts: 117 Germany , Dortmund
Bone
OP
Member
|
OP
Member
Joined: May 2010
Posts: 117
Germany , Dortmund
|
http://manual.3dgamestudio.net/newfeatures8.htmThere you find Actor paths can be created by script with the path_create function. The path_set function can be used to retrieve the path name. I think that should work for pathes created with path_create too. I dont want to create the path for each vehicle that shall follow the street
|
|
|
|