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
1 registered members (TipmyPip), 18,633 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
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 | 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