|
Re: Empty Pointer woes
[Re: JazzDude]
#200659
04/05/08 07:50
04/05/08 07:50
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
i dont think this will work but you can try
make a ENTITY* ent_h;
ent_h = ent_create("warrior.mdl",temp,act_warrior); ent_h.spawned_entity = on; //triggers stuff in the warrior action ent_h.entity_type_id = indian_type; //triggers unique animations
if you wait a frame you could lose your you pointer
no other stupid sugestions yet (;
Last edited by flits; 04/05/08 07:50.
"empty"
|
|
|
Re: Empty Pointer woes
[Re: JazzDude]
#200821
04/05/08 18:02
04/05/08 18:02
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Three remarks on your code, JazzDude: 1. Setting invisible and passable in a loop is senseless. Better place that before the loop. Increases performance... 2. Setting up the temp vector and then waiting 2 frames and finally using it is a source for hard to find errors. If you set up temp to vertain values you should use them immediately. Otherwise other functions may overwirte you temp vector with arbitrary data. 3. Be sure to wait at least one frame in your act_trapper and act_indian action, before reading out spawned_entity and entity_type_id.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Empty Pointer woes
[Re: Uhrwerk]
#200831
04/05/08 19:18
04/05/08 19:18
|
Joined: Sep 2003
Posts: 733 Whitefish, Montana
JazzDude
OP
User
|
OP
User
Joined: Sep 2003
Posts: 733
Whitefish, Montana
|
As you've noticed in the past, Uhrwerk, I don't use C-script. I use Klutz-script, so constructive criticism is always very welcome. Thanks.
|
|
|
|