Posted By: WickWoody
Understanding objects with c_trace - 05/04/10 13:45
I want to understand objects between "you" and "me" with c_trace. But I don't know how can I do this. I wait for your helps. Thanks for advice.
Posted By: Widi
Re: Understanding objects with c_trace - 05/04/10 14:06
you and me are Pointers to a Entity (Pointer are explain in the Workshop or in the Manual if you don`t know what is). Now you make a trace from the Player to a enemy in the Players action. The my-Pointer shows to the Player before and after the trace, you can use it following: "my.skill1 = 20;". Now the Players skill1 is 20. But the you-Pointer is NULL before the tracing and after it if it hit the enemy the you-Pointer points to this enemy. After the trace you can set the skills or other things following: "you.skill1 = 20;" and now the Enemys skill1 is 20.
One other thing: you have the IGNORE_ME and IGNORE_YOU flags by c_trace. At the example up the my-Pointer show to the Player, and if you set IGNORE_ME the trace don`t affect with the Player. But the you-Pointer is at this moment = NULL, and so IGNORE_YOU make notting. But you can set the you-Pointer before the c_trace to a specific Entity: "you = my_spec_ent_pointer;" and if you trace now with the IGNORE_YOU the trace don`t see this specific Ent.
Hope you understand my english...
Posted By: WickWoody
Re: Understanding objects with c_trace - 05/04/10 14:24
I think, I couldn't explain. Actually I want to control objects between "you" and "me".
Posted By: Uhrwerk
Re: Understanding objects with c_trace - 05/04/10 19:12
Physically in between you and me?
Posted By: TalontheLord
Re: Understanding objects with c_trace - 05/09/10 17:55
I think you can find something in 24th Lite-C workshop. See following code:
c_scan(my.x,my.pan,vector(360,0,750),SCAN_ENTS | SCAN_FLAG2 | IGNORE_ME);
if (you) { // red wizard or flying spell detected?
my.STATE = 2;
enemy = your.CREATOR;
Posted By: MasterQ32
Re: Understanding objects with c_trace - 05/09/10 18:28
you could do something like this:
ENTITY youTarget = you;
while(c_trace(my.x,your.x,IGNORE_ME | IGNORE_YOU))
{
//Now you is you the object that was hit
//Do with you what you want
//Now you is you the old you pointer
you = youTarget;
}