Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (henrybane), 1,499 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 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 | chip programmers | 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