Zdepth = actor+ 0.00001 ???

Game Editor comments and discussion.

Zdepth = actor+ 0.00001 ???

Postby Oman » Thu Jun 28, 2007 7:55 pm

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? :?
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Postby metal_pt » Thu Jun 28, 2007 8:07 pm

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 :?
]v[eta[_ - Using GE since June, 15 2007
Currently using v1.3.8 Registered
metal_pt
 
Posts: 117
Joined: Sat Jun 16, 2007 12:57 pm
Location: Sintra, Portugal
Score: 2 Give a positive score

Postby Oman » Thu Jun 28, 2007 8:25 pm

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. :(
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Postby metal_pt » Thu Jun 28, 2007 8:39 pm

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);
]v[eta[_ - Using GE since June, 15 2007
Currently using v1.3.8 Registered
metal_pt
 
Posts: 117
Joined: Sat Jun 16, 2007 12:57 pm
Location: Sintra, Portugal
Score: 2 Give a positive score

Postby Oman » Thu Jun 28, 2007 8:47 pm

TYVM, it works. +1 for u my friend :D
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Postby metal_pt » Thu Jun 28, 2007 9:52 pm

Glad I could help you :)
]v[eta[_ - Using GE since June, 15 2007
Currently using v1.3.8 Registered
metal_pt
 
Posts: 117
Joined: Sat Jun 16, 2007 12:57 pm
Location: Sintra, Portugal
Score: 2 Give a positive score

Postby Game A Gogo » Thu Jun 28, 2007 11:15 pm

also, I believe that ZDepth is not a variable. should be though, so that you could read from it!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Oman » Fri Jun 29, 2007 12:46 am

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:
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Postby Game A Gogo » Fri Jun 29, 2007 1:17 am

I know :P
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron