Page 1 of 1

Zdepth = actor+ 0.00001 ???

PostPosted: Thu Jun 28, 2007 7:55 pm
by Oman
Hello,

Can i do a code something like this?

Code: Select all
ZDepth=shadow.ZDepth+0.00001;


I know this doesn't work, but can someone help me make it work
(i put it in Create Actor of my player actor)

I want my player to have the same zdepth of my shadow + 0.00001

How can i do it? :?

PostPosted: Thu Jun 28, 2007 8:07 pm
by metal_pt
Can you make the player parent of shadow?
If not try:
Code: Select all
ZDepth=getclone("shadow")->ZDepth+0.00001;

I don't know if it will work either :?

PostPosted: Thu Jun 28, 2007 8:25 pm
by Oman
No, i cant make the player parent of the shadow. (the shadow has a transparancy).

And with your code i get an illegal structure error. :(

PostPosted: Thu Jun 28, 2007 8:39 pm
by metal_pt
hmmm...

What if you create a global variable named anything where you will attrib the ZDepth os both actors.

Code: Select all
anything=.006;
ChangeZDepth("player", anything);
ChangeZDepth("shadow", anything+.00001);

PostPosted: Thu Jun 28, 2007 8:47 pm
by Oman
TYVM, it works. +1 for u my friend :D

PostPosted: Thu Jun 28, 2007 9:52 pm
by metal_pt
Glad I could help you :)

PostPosted: Thu Jun 28, 2007 11:15 pm
by Game A Gogo
also, I believe that ZDepth is not a variable. should be though, so that you could read from it!

PostPosted: Fri Jun 29, 2007 12:46 am
by Oman
yes.. that way i could read the zdepth from a actor(1) then, on another actor(2), change it so no matter what zdepth it is, it will copy the first
actor(1) + 0.00001; :D

perhaps a future request...

P.S. Game a gogo, i pm ed u, it has nothing to do with this though. :lol:

PostPosted: Fri Jun 29, 2007 1:17 am
by Game A Gogo
I know :P