Page 1 of 2
ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 8:36 am
by Bee-Ant
I wanna use zdepth variable to change some actors zdepth in RPG game. And use fps variable to change the fps of any animation, such as to make a wheel rotate as fast as it's speed...
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 9:27 am
by Kalladdolf
I totally agree.
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 9:47 am
by Bee-Ant
So, Makslane...please grant our request...
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 9:58 am
by j2graves
I thought that there already was a change zdepth variable.
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 10:12 am
by Bee-Ant
Not yet, zdepth is a FUNCTION right now. not a VARIABLE
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 10:14 am
by j2graves
I never quite understood the difference
![Embarassed :oops:](http://game-editor.com/forum/images/smilies/icon_redface.gif)
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 10:22 am
by Bee-Ant
Function is such as : CollisionEvent, ChangeAnimation, ChangeZDepth, CreateActor, ChangeTransparency and etc
Variable is such as : r, g, b, angle, x, y, xvelocity, yvelocity, directional_velocity, transp, user variables and etc
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 10:26 am
by j2graves
oh, I C.
![Very Happy :D](http://game-editor.com/forum/images/smilies/icon_biggrin.gif)
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 11:11 am
by Fuzzy
why do you need direct access to the variable?
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 11:20 am
by Bee-Ant
To make efficiency
Do you know how to make ZDepth of any actor will decrease when his y position decrease too???and increase when his y position increase too???
Such as :
Actor>KeyDown>Up>
- Code: Select all
y-=3;
zdepth-=0.1;
Actor>KeyDown>Down>
- Code: Select all
y+=3;
zdepth+=0.1;
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 11:34 am
by j2graves
cool Idea
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 11:36 am
by Bee-Ant
I wanna make that code in RPG game, to make difference zdepth depend on it's y position
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 12:59 pm
by Fuzzy
Bee-Ant, is it always changing y by 3? and always changing z depth by 0.1?
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 1:07 pm
by Bee-Ant
So, do you know how to make different zdepth depend on it's y position???
Also make different animation fps depend on it's speed???
I also want this :
- Code: Select all
fps=xvelocity;
Re: ZDEPTH and FPS variable please...
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Dec 28, 2007 1:25 pm
by Fuzzy
You cannot change the FPS, but I will show you something with the zdepth function.
Now I need to clarify.. the zdepth will always be a certain value depending on the actual y value, rather than just changing whenever you move? Say that y = 300. zdepth will always be a certain value based on that, rather than how many times a key is pressed? You showed your example that way, but I am just wondering if it can be done without a keypress?
Try this:
- Code: Select all
ChangeZDepth("Event Actor", y*0.03333);
Put that right after the y position changes. Note that it could make the zdepth more than 1.0, but thats perfectly fine with GE.