Kurze Pointer Frage

Posted By: Martek

Kurze Pointer Frage - 10/06/07 17:33

Hi,

ich habe in einer function einen you-pointer. Das ist der getroffene Gegner.
Danach kommt aber nochmal eine c_Trace anweisung. Dadurch wird ja ein neuer you-pointer gesetzt. Wie könnte ich den alten you-pointer speichern, so das ich ihm nach dem 2. c_trace tortzdem noch leben abziehen kann??? Oder geht das garnicht???

I've in a function a you-pointer. The you is the hit enemy. After that comes a second trace, so there is a new you-pointer. How can I use the first you-pointer, the hit enemy, after the second trace???

Mfg, Pingulord
Posted By: flits

Re: Kurze Pointer Frage - 10/06/07 18:20

var ent_handle;


ent_handle = handle(you);// save it
you = ptr_for_handle(ent_handle);//load it
Posted By: Scorpion

Re: Kurze Pointer Frage - 10/06/07 18:56

Du musst nichtmals mit handle arbeiten es reicht im Grunde schon:

temp=you;
c_trace(blub);
you=temp;
Posted By: Martek

Re: Kurze Pointer Frage - 10/06/07 20:26

Achso danke:)

Mfg, Pingulord
© 2023 lite-C Forums