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
3 registered members (NnamueN, Akow, 1 invisible), 1,421 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
c_trace/move - returning the 'texture' hit? #256166
03/15/09 01:20
03/15/09 01:20
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Hi!
Is there a way to obtain this information? when performing a c_move, for example, hitting an object and know what is its texture?

I could swear I read this same question on one of the aum! But I read them all twice and didn't find it again.. (probably imagining things)

Re: c_trace/move - returning the 'texture' hit? [Re: DiegoFloor] #256169
03/15/09 02:19
03/15/09 02:19
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
c_move doesnt, but if you performe a
c_trace(me.x, target.x,IGNORE_ME|SCAN_TEXTURE)(untested)
then the tex_name variable will be the texture name of what was hit.
OR
c_trace(me.x, you.x,IGNORE_ME|SCAN_TEXTURE)(untested)
then the tex_name variable will be the model-filename of what was hit.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: c_trace/move - returning the 'texture' hit? [Re: EvilSOB] #256170
03/15/09 03:17
03/15/09 03:17
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Hey thanks! laugh That is just right for the job

I have more questions; is this tex_name a string? Because I'm trying to work with this variable but nothing works. I tried:
test_string = tex_name;
(test_string is a global string variable that I show in a panel)

I also tried:
if(tex_name == "bluetex.pcx") ...

Where am I doing something wrong? o_O

Re: c_trace/move - returning the 'texture' hit? [Re: DiegoFloor] #256177
03/15/09 06:18
03/15/09 06:18
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Yeah, its a real string, so you'll need to use
str_cpy(test_string,tex_name); instead of test_string = tex_name;
and
if(str_cmp(tex_name,"bluetex.pcx")) instead of if(tex_name=="bluetex.pcx")
(both assuming lite-c, may work for c-script, otherwise I dunno)



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: c_trace/move - returning the 'texture' hit? [Re: EvilSOB] #256194
03/15/09 09:04
03/15/09 09:04
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
ah.. I think I remember this blush blush

Good thing there is a beginners forum eh? laugh hehe

Thanks for the help! smile

Re: c_trace/move - returning the 'texture' hit? [Re: DiegoFloor] #256234
03/15/09 14:29
03/15/09 14:29
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
No problem. If it wasnt for the beginners forum, I'd probably forget the simple stuff...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

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