Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,416 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Understanding objects with c_trace #322020
05/04/10 13:45
05/04/10 13:45
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
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.

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 Offline
Serious User
Widi  Offline
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: Widi] #322035
05/04/10 14:24
05/04/10 14:24
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
I think, I couldn't explain. Actually I want to control objects between "you" and "me".

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 Offline
Expert
Uhrwerk  Offline
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 Offline
Newbie
TalontheLord  Offline
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
Re: Understanding objects with c_trace [Re: TalontheLord] #322803
05/09/10 18:28
05/09/10 18:28
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
you could do something like this:
Code:
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;
}




Visit my site: www.masterq32.de

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1