|
1 registered members (TipmyPip),
18,633
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Understanding objects with c_trace
[Re: WickWoody]
#322029
05/04/10 14:06
05/04/10 14:06
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
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...
Last edited by Widi; 05/04/10 14:09.
|
|
|
Re: Understanding objects with c_trace
[Re: WickWoody]
#322104
05/04/10 19:12
05/04/10 19:12
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Physically in between you and me?
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Understanding objects with c_trace
[Re: Uhrwerk]
#322800
05/09/10 17:55
05/09/10 17:55
|
Joined: Jun 2005
Posts: 11 turkey
TalontheLord
Newbie
|
Newbie
Joined: Jun 2005
Posts: 11
turkey
|
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;
dart
|
|
|
|
|
|