Need Help with Very Advanced Movement System
#1
Posted 24 June 2011 - 02:19 AM
First of all, I would like my RPG to have 8-directional movement. I've seen examples of simple systems that don't have changing sprites, and I spent quite a bit of time making the cardinal direction sprites, so that would be very helpful.
Second, I want to have a running system. Not just any running system, but one that utilizes "fatigue" for realism (so you can't just sprint everywhere). I wanted my running system to have a variable for whether or not they are running, and their fatigue, which decreases as they hold the Shift key to run.
I'll just go ahead and list the features I need to keep things simple:
~ 8-directional movement (with changing sprites)
~Hold 'Shift' to run
~"Fatigue" variable that decreases as you run. When it hits 0, your player cannot run anymore until fatigue recharges over time. Idk if this is too complicated, but I would like to have fatigue regenerate faster when you aren't moving than when you are walking.
As always, any help is greatly appreciated. Thank you for your time.
#2
Posted 24 June 2011 - 03:36 AM
moving = 0; //(1= walk, 2 = run)
hd = keyboard_check(vk_right) - keyboard_check(vk_left)
vd = keyboard_check(vk_down) - keyboard_check(vk_up)
if(dh !=0 or vd !=0)
{
moving = 1 + keyboard_check(vk_shift); //1 or 2
}
speed = 0;
friction = 0;
if(moving)
{
direction = point_direction(0,0,hd,vd);
speed = <walk_speed>;
if(moving == 2)
{
speed = <run_speed>;
friction = Fatigue/100 * <run_speed>;
}
}
#3
Posted 24 June 2011 - 04:02 AM
Create Event
maxspeed=n // n is the max speed you want global.stamina=n // n is the stamina points in the pool running=false
Step Event
if hspeed!=0 || vspeed!=0
{global.stamina+=1}
if hspeed=0 && vspeed=0
{global.stamina+=2}
if keyboard_check(vk_shift)
{running=true;}
if keyboard_check_released(vk_shift)
{running=false;}
if running=true
{global.stamina-=1}
if keyboard_check(ord("A"))
{
if hspeed <= max_speed
{
if running!=true{hspeed -= .6;}else{hspeed -= .8;}
}
else if hspeed >= -max_speed
{
if running!=true{hspeed = -max_speed/2}else{hspeed = -max_speed}
}
}
if keyboard_check(ord("D"))
{
if hspeed <= max_speed
{
if running!=true{hspeed += .6;}else{hspeed += .8;}
}
else if hspeed >= max_speed
{
if running!=true{hspeed = max_speed/2}else{hspeed=max_speed}
}
}
if keyboard_check(ord("W"))
{
if vspeed <= max_speed
{
if running!=true{hspeed -= .6;}else{hspeed -= .8:}
}
else if vspeed >= -max_speed
{
if running!=true{vspeed = -max_speed/2}else{vspeed = -max_speed}
}
}
if keyboard_check(ord("S"))
{
if vspeed <= max_speed
{
if running!=true{vspeed += .6;}else{vspeed += .8;}
}
else if vspeed >= max_speed
{
if running!=true{vspeed = max_speed/2}else{vspeed = max_speed}
}
}BTW that code includes incremental acceleration and is affected by the "running" variable. IE if you are running you will accelerate faster than walking. If you are walking you are going half the "max_speed".
I'm sure someone could condense down the code to just a few lines but it is drawn-out the way it is for learning purposes.
Edited by XxTaLoNxX, 24 June 2011 - 04:05 AM.
#4
Posted 24 June 2011 - 04:02 AM
moving = 0; //(1= walk, 2 = run)
hd = keyboard_check(vk_right) - keyboard_check(vk_left)
vd = keyboard_check(vk_down) - keyboard_check(vk_up)
if(dh !=0 or vd !=0)
{
moving = 1 + keyboard_check(vk_shift); //1 or 2
}
speed = 0;
friction = 0;
if(moving)
{
direction = point_direction(0,0,hd,vd);
speed = <walk_speed>;
if(moving == 2)
{
speed = <run_speed>;
friction = Fatigue/100 * <run_speed>;
}
}
Thank you icuurd! I've already figured out a code myself (who would've guessed??) that makes everything work perfectly except for the fatigue. I was just wondering how I could make fatigue go lower every second. You start out with 20 fatigue, therefore you could run for up to 20 seconds at a time with a 0.5 second regeneration when not moving, and a 1 second regeneration when walking. For example, if I was not moving, I would regenerate 1 fatigue every half-second, and if I was walking, I'd regenerate 1 fatigue every second.
EDIT:
On second thought, I don't think I will use the fatigue system. However, I thank everyone for all their help. I'm amazed at how sweet my movement system works!
Edited by ZyronnSorrow, 24 June 2011 - 04:09 AM.
#5
Posted 24 June 2011 - 04:10 AM
I was just wondering how I could make fatigue go lower every second. You start out with 20 fatigue, therefore you could run for up to 20 seconds at a time with a 0.5 second regeneration when not moving, and a 1 second regeneration when walking. For example, if I was not moving, I would regenerate 1 fatigue every half-second, and if I was walking, I'd regenerate 1 fatigue every second.
Well it involves math on your part.
1) What is the Game Speed set at? 30FPS//60FPS//90FPS
2) That is the number of Step Events that occur per second
3) Produce an equation that will net you the gains per second that you are wanting.
EDIT: Just for sake of ease while programming. Use WHOLE NUMBERS where you can. Fractals and small fractional increases can get confusing and at worst cause complications. So if you want to increase at the rate you want use the whole numbers and then divide the global.variable pool by 2 and then round with the round(global.variable).
Edited by XxTaLoNxX, 24 June 2011 - 04:18 AM.
#6
Posted 24 June 2011 - 04:31 AM
and Fatigue = median(0,Fatigue-1,100) when you dont
at the bottom of the step code I gave you
if(moving <=1) Fatigue = median(0,Fatigue-1,100)
else Fatigue = median(0,Fatigue+1,100)
#7
Posted 24 June 2011 - 04:50 PM
The FPS is 30, so that means that if I set the fatigue and maxfatigue* values to 150, you can run for up to 5 seconds. The only bugs I have seen with this is that when you run out of fatigue and you're still holding the shift key, the animation looks a little glitchy. Also, fatigue will not regenerate until after you release the shift key.
My next step would be to create a bar that represents your player's fatigue. I'll try to look for a tutorial for how to make bars, but if I don't find one I'll edit this post and let you guys know.
EDIT:
Ok, there really isn't a good example for making healthbars. I would like to have three bars, one red (health), one blue (Essence, used to cast spells), and one green (fatigue) in the lower left hand corner. The bars would never change in size, they would accordingly decrease to the amount of health/essence/fatigue you have (which goes up every level)
Edited by ZyronnSorrow, 24 June 2011 - 06:22 PM.
#8
Posted 24 June 2011 - 08:34 PM
Use the draw_healthbar function. It basically cannot go wrong.Ok, there really isn't a good example for making healthbars. I would like to have three bars, one red (health), one blue (Essence, used to cast spells), and one green (fatigue) in the lower left hand corner. The bars would never change in size, they would accordingly decrease to the amount of health/essence/fatigue you have (which goes up every level)
#9
Posted 25 June 2011 - 12:45 AM
The only bugs I have seen with this is that when you run out of fatigue and you're still holding the shift key, the animation looks a little glitchy. Also, fatigue will not regenerate until after you release the shift key.
These are actually easier to fix than you might think. One way to get the animation to smooth out is to add some code that increases and decreases the image_speed based on speed or whatever variable you use for "movement speed". This is just an example... it may work perfectly for you or you may need to mess with the numbers just a bit.
image_speed = ((hspeed/100) * sign(hspeed))*4;
// this means the slower you are moving the slower the animation speed, vice-verse for faster
That was ripped from one of my games and like I said, you may need to mess with the numbers a bit, because that is custom fitted for my animations. The equation works as so... image_speed = hspeed divided by 100 lets say hspeed = -12 that puts it at -.12 then multiply by the sign of hspeed (it's negative so it's -1) which gives us a positive number to multiply by 4 bringing the image_speed to .48 .
As for the fatigue... I would have to see the code in order to figure it out. But I would probably use an "alarm loop" something like...
Alarm[0]
if fatigue = max_fatigue
{exit;}
if fatigue != max_fatigue && if running != true
{
add fatigue code here;
alarm[0]=1;
}else{alarm[0]=1;}
// what this does is check the alarm every step and if running != true then executes your code to add fatigue
// if your fatigue isn't maxed outREMEMBER!! You HAVE to have something set the alarm, what that would be... I would need to see your code, but you seem smart so I think you could figure it out yourself. The plus with that "alarm loop" is that it keeps code out of the Step Events and only runs when triggered.
Edited by XxTaLoNxX, 25 June 2011 - 12:47 AM.
#10
Posted 25 June 2011 - 11:22 PM
Use the draw_healthbar function. It basically cannot go wrong.
Ok, there really isn't a good example for making healthbars. I would like to have three bars, one red (health), one blue (Essence, used to cast spells), and one green (fatigue) in the lower left hand corner. The bars would never change in size, they would accordingly decrease to the amount of health/essence/fatigue you have (which goes up every level)
Really? Ok I'll give it a shot. The only thing is, can I edit the colors? I need different colors to represent the different parts.
#11
Posted 25 June 2011 - 11:25 PM
Well, here's the code for the Step event of the player's object (it's very, very long):
EDIT: New scripts, completely commented and sperated to reduce eye-bleeding and uber-frustration:
|:Create Event:|
/*Setting up the Player*/
sprite_index = spr_HeroDown //Show the player's sprite facing down
image_index = 1 //Player's sprite facing down, standing position
image_speed = 0 //Stops the sprite from animating
running = false //The player isn't running
fatigue = 150 //Sets the player's current fatigue
maxfatigue = 150 //Sets the player's maximum fatigue
depth = -y //This handy little piece takes the images towards the front and draws them in front of objects behind them
|:Alarm 0 Event:|
/*Fatigue Regeneration*/
if (fatigue = maxfatigue) //If the fatigue is maxed out
{
exit // No fatigue regeneration
}
if (fatigue != maxfatigue) && (running != true) //If fatigue isn't maxed out and the player isn't running
{
fatigue += 1 //Regenerate fatigue
alarm[0]=1 //Reset the alarm
}
else
{
alarm[0]=1 //Reset the alarm
}
|:Step Event:|
/*Running*/
if (keyboard_check(vk_shift)) //If the player is pressing the shift key
{
if (fatigue > 0) //If fatigue is above 0
{
running = true //The player is running
}
else //If the player is out of fatigue
{
running = false //The player isn't running
alarm[0] = 1 //Sets alarm 0
}
}
else //If the player isn't pressing shift
{
running = false //The player isn't running
alarm[0] = 1 //Sets alarm 0
}
/*Movement*/
if (keyboard_check(vk_up)) //If the player is pressing the up arrow key
{
sprite_index = spr_HeroUp //Show the player's up-facing sprite
if running = true //If the player is running
{
image_speed = ((vspeed/100) * sign(vspeed))*10 //This equation makes the sprite animate faster
vspeed = -6 //The player's up speed will be 6
}
else //If the player isn't running
{
image_speed = ((vspeed/100) * sign(vspeed))*8 //Slower sprite animation
vspeed = -3 //The player's up speed will be 3
}
}
if (keyboard_check(vk_down)) //If the player is pressing the down arrow key
{
sprite_index = spr_HeroDown //Show the player's down-facing sprite
if running = true //If the player is running
{
image_speed = ((vspeed/100) * sign(vspeed))*10 //Faster sprite animation
vspeed = 6 //The player's down speed will be 6
}
else //If the player isn't running
{
image_speed = ((vspeed/100) * sign(vspeed))*8 //Slower sprite animation
vspeed = 3 //The player's down speed will be 3
}
}
if (keyboard_check(vk_left)) //If the player is pressing the left arrow key
{
sprite_index = spr_HeroLeft //Show the player's left-facing sprite
if running = true //If the player is running
{
image_speed = ((hspeed/100) * sign(hspeed))*10 //Faster sprite animation
hspeed = -6 //The player's left speed will be 6
}
else //If the player isn't running
{
image_speed = ((hspeed/100) * sign(hspeed))*8 //Slower sprite animation
hspeed = -3 //The player's left speed will be 3
}
}
if (keyboard_check(vk_right)) //If the player is pressing the right arrow key
{
sprite_index = spr_HeroRight //Show the player's right-facing sprite
if running = true //If the player is running
{
image_speed = ((hspeed/100) * sign(hspeed))*10 //Faster sprite animation
hspeed = 6 //The player's right speed will be 6
}
else //If the player isn't running
{
image_speed = ((hspeed/100) * sign(hspeed))*8 //Slower sprite animation
hspeed = 3 //The player's right speed will be 3
}
}
if (keyboard_check(vk_up)) && (keyboard_check(vk_right)) //If the player is pressing the up and right arrow keys
{
sprite_index = spr_HeroUpRight //Showhe player's up-right-facing sprite
if running = true //If the player is running
{
image_speed = ((hspeed/100) * sign(hspeed))*10 //Faster sprite animation
hspeed = 6 //The player's right speed will be 6
vspeed = -6 // The player's up speed will be 6
}
else //If the player isn't running
{
image_speed = ((hspeed/100) * sign(hspeed))*8 //Slower sprite animation
hspeed = 3 //The player's right speed will be 3
vspeed = -3 // The player's up speed will be 3
}
}
if (keyboard_check(vk_up)) && (keyboard_check(vk_left)) //If the player is pressing the up and left arrow keys
{
sprite_index = spr_HeroUpLeft //Show the player's up-left-facing sprite
if running = true //If the player is running
{
image_speed = ((hspeed/100) * sign(hspeed))*10 //Faster sprite animation
hspeed = -6 //The player's left speed will be 6
vspeed = -6 //The player's up speed will be 6
}
else //If the player isn't running
{
image_speed = ((hspeed/100) * sign(hspeed))*8 //Slower sprite animation
hspeed = -3 //The player's left speed will be 3
vspeed = -3 //The player's up speed will be 3
}
}
if (keyboard_check(vk_down)) && (keyboard_check(vk_right)) //If the player is pressing the down and right arrow keys
{
sprite_index = spr_HeroDownRight //Show the player's down-right-facing sprite
if running = true // If the player is running
{
image_speed = ((hspeed/100) * sign(hspeed))*10 //Faster sprite animation
hspeed = 6 //The player's right speed will be 6
vspeed = 6 //The player's down speed will be 6
}
else //If the player isn't running
{
image_speed = ((hspeed/100) * sign(hspeed))*8 //Slower sprite animation
hspeed = 3 //The player's right speed will be 3
vspeed = 3 //The player's down speed will be 3
}
}
if (keyboard_check(vk_down)) && (keyboard_check(vk_left)) //If the player is pressing the down and left arrow keys
{
sprite_index = spr_HeroDownLeft //Show the player's down-left-facing sprite
if running = true //If the player is running
{
image_speed = ((hspeed/100) * sign(hspeed))*10 //Faster sprite animation
hspeed = -6 //The player's left speed will be 6
vspeed = 6 //The player's down speed will be 6
}
else //If the player isn't running
{
image_speed = ((hspeed/100) * sign(hspeed))*8 //Slower sprite animation
hspeed = -3 //The player's left speed will be 3
vspeed = 3 //The player's down speed will be 3
}
}
/*Stopping*/
if (keyboard_check_released(vk_up)) //If the player releases the up arrow key
{
image_index = 1 //Player sprite facing up, standing position
image_speed = 0 //Sprite stops animating
vspeed = 0 //Player stops moving
}
if (keyboard_check_released(vk_down)) //If the player releases the down arrow key
{
image_index = 1 //Player sprite facing down, standing position
image_speed = 0 //Sprite stops animating
vspeed = 0 //Player stops moving
}
if (keyboard_check_released(vk_left)) //If the player releases the left arrow key
{
image_index = 1 //Player sprite facing left, standing position
image_speed = 0 //Sprite stops animating
hspeed = 0 //Player stops moving
}
if (keyboard_check_released(vk_right)) //If the player releases the right arrow key
{
image_index = 1 //Player sprite facing right, standing position
image_speed = 0 //Sprite stops animating
hspeed = 0 //Player stops moving
}
/*Fatigue*/
if (running = true) //If the player is running
{
fatigue -= 1 //Fatigue depletes over time
}
I will be deeply impressed should someone read through all of that and get it (even though the comments help dumb it down). I will definitely add more variables to the Create event for the player's health, maxhealth, experience, level, all that good stuff. The scripts above are just where I'm at now.
Edited by ZyronnSorrow, 27 June 2011 - 01:34 AM.
#12
Posted 26 June 2011 - 02:57 PM
Yup.
Use the draw_healthbar function. It basically cannot go wrong.
Ok, there really isn't a good example for making healthbars. I would like to have three bars, one red (health), one blue (Essence, used to cast spells), and one green (fatigue) in the lower left hand corner. The bars would never change in size, they would accordingly decrease to the amount of health/essence/fatigue you have (which goes up every level)
Really? Ok I'll give it a shot. The only thing is, can I edit the colors? I need different colors to represent the different parts.
draw_healthbar(x1,y1,x2,y2,amount,backcol,mincol,maxcol,direction,showback,showborder)
However, I personally dislike this part, as they basically blend the two colours when the amount is at, say, 50.
If you want to make very versatile bars, though, I'd use a sprite with 100 subimages (you get the idea). Then you can draw the shape of the bar, add shading etc.
#13
Posted 26 June 2011 - 03:45 PM
Yup.
Use the draw_healthbar function. It basically cannot go wrong.
Ok, there really isn't a good example for making healthbars. I would like to have three bars, one red (health), one blue (Essence, used to cast spells), and one green (fatigue) in the lower left hand corner. The bars would never change in size, they would accordingly decrease to the amount of health/essence/fatigue you have (which goes up every level)
Really? Ok I'll give it a shot. The only thing is, can I edit the colors? I need different colors to represent the different parts.
draw_healthbar(x1,y1,x2,y2,amount,backcol,mincol,maxcol,direction,showback,showborder)
However, I personally dislike this part, as they basically blend the two colours when the amount is at, say, 50.
If you want to make very versatile bars, though, I'd use a sprite with 100 subimages (you get the idea). Then you can draw the shape of the bar, add shading etc.
I really don't get what all the options of the draw_healthbar function mean. I'll check the help guide to try to figure it out, but I also want to know if there's a way I can change the healthbar to account for when you level up and gain more health. That is precisely why I will not make a 100 subimage sprite, because health wil increase.
#14
Posted 26 June 2011 - 04:05 PM
image_index = currentHP*100/maxHP - 1
#15
Posted 26 June 2011 - 05:21 PM
Max health (?) can increase even if you use a spritebar. Just write
image_index = currentHP*100/maxHP - 1
Really? Ok sweet! I'l use a spritebar then.
#16
Posted 26 June 2011 - 06:22 PM
@ Talon:
Well, here's the code for the Step event of the player's object (it's very, very long):if (keyboard_check(vk_shift)) { if (fatigue > 0) { running = true } else { running = false } } else { running = false } if (keyboard_check(vk_up)) { sprite_index = spr_HeroUp if running = true { image_speed = 1 y -= 6 } else { image_speed = 0.5 y -= 3 } } if (keyboard_check(vk_down)) { sprite_index = spr_HeroDown if running = true { image_speed = 1 y += 6 } else { image_speed = 0.5 y += 3 } } if (keyboard_check(vk_left)) { sprite_index = spr_HeroLeft if running = true { image_speed = 1 x -= 6 } else { image_speed = 0.5 x -= 3 } } if (keyboard_check(vk_right)) { sprite_index = spr_HeroRight if running = true { image_speed = 1 x += 6 } else { image_speed = 0.5 x += 3 } } if (keyboard_check(vk_up)) && (keyboard_check(vk_right)) { sprite_index = spr_HeroUpRight if running = true { image_speed = 1 x += 2 y -= 2 } else { image_speed = 0.5 x += 1 y -= 1 } } if (keyboard_check(vk_up)) && (keyboard_check(vk_left)) { sprite_index = spr_HeroUpLeft if running = true { image_speed = 1 x -= 2 y -= 2 } else { image_speed = 0.5 x -= 1 y -= 1 } } if (keyboard_check(vk_down)) && (keyboard_check(vk_right)) { sprite_index = spr_HeroDownRight if running = true { image_speed = 1 x += 2 y += 2 } else { image_speed = 0.5 x += 1 y += 1 } } if (keyboard_check(vk_down)) && (keyboard_check(vk_left)) { sprite_index = spr_HeroDownLeft if running = true { image_speed = 1 x -= 2 y += 2 } else { image_speed = 0.5 x -= 1 y += 1 } } if (keyboard_check_released(vk_up)) { image_index = 1 image_speed = 0 } if (keyboard_check_released(vk_down)) { image_index = 1 image_speed = 0 } if (keyboard_check_released(vk_left)) { image_index = 1 image_speed = 0 } if (keyboard_check_released(vk_right)) { image_index = 1 image_speed = 0 } if (running = true) { fatigue -= 1 } else if (image_speed = 0.5) { fatigue += 1 } else { fatigue += 2 } if (fatigue > maxfatigue) { fatigue = maxfatigue }
Later today I will help you if you still need some help. In the mean time I can leave you with a tip... use annotations like this
//this is what this code does or is meant to doas often as you can so you have reference points. Also separate and isolate different engines. Like the movement code and fatigue code. This can help others help you faster by isolating the issues without reading through every line of code like they are trying to find the answers to the universe while deciphering hieroglyphics.
#17
Posted 27 June 2011 - 12:37 AM
@ Talon:
Well, here's the code for the Step event of the player's object (it's very, very long):if (keyboard_check(vk_shift)) { if (fatigue > 0) { running = true } else { running = false } } else { running = false } if (keyboard_check(vk_up)) { sprite_index = spr_HeroUp if running = true { image_speed = 1 y -= 6 } else { image_speed = 0.5 y -= 3 } } if (keyboard_check(vk_down)) { sprite_index = spr_HeroDown if running = true { image_speed = 1 y += 6 } else { image_speed = 0.5 y += 3 } } if (keyboard_check(vk_left)) { sprite_index = spr_HeroLeft if running = true { image_speed = 1 x -= 6 } else { image_speed = 0.5 x -= 3 } } if (keyboard_check(vk_right)) { sprite_index = spr_HeroRight if running = true { image_speed = 1 x += 6 } else { image_speed = 0.5 x += 3 } } if (keyboard_check(vk_up)) && (keyboard_check(vk_right)) { sprite_index = spr_HeroUpRight if running = true { image_speed = 1 x += 2 y -= 2 } else { image_speed = 0.5 x += 1 y -= 1 } } if (keyboard_check(vk_up)) && (keyboard_check(vk_left)) { sprite_index = spr_HeroUpLeft if running = true { image_speed = 1 x -= 2 y -= 2 } else { image_speed = 0.5 x -= 1 y -= 1 } } if (keyboard_check(vk_down)) && (keyboard_check(vk_right)) { sprite_index = spr_HeroDownRight if running = true { image_speed = 1 x += 2 y += 2 } else { image_speed = 0.5 x += 1 y += 1 } } if (keyboard_check(vk_down)) && (keyboard_check(vk_left)) { sprite_index = spr_HeroDownLeft if running = true { image_speed = 1 x -= 2 y += 2 } else { image_speed = 0.5 x -= 1 y += 1 } } if (keyboard_check_released(vk_up)) { image_index = 1 image_speed = 0 } if (keyboard_check_released(vk_down)) { image_index = 1 image_speed = 0 } if (keyboard_check_released(vk_left)) { image_index = 1 image_speed = 0 } if (keyboard_check_released(vk_right)) { image_index = 1 image_speed = 0 } if (running = true) { fatigue -= 1 } else if (image_speed = 0.5) { fatigue += 1 } else { fatigue += 2 } if (fatigue > maxfatigue) { fatigue = maxfatigue }
Later today I will help you if you still need some help. In the mean time I can leave you with a tip... use annotations like this//this is what this code does or is meant to doas often as you can so you have reference points. Also separate and isolate different engines. Like the movement code and fatigue code. This can help others help you faster by isolating the issues without reading through every line of code like they are trying to find the answers to the universe while deciphering hieroglyphics.
Lol you're right. I'm kind of lazy like that, sry. When I have some spare time, I'll go ahead and edit that script (I changed it anyways to accomadate for the information you gave me)
#18
Posted 27 June 2011 - 01:33 AM
Max health (?) can increase even if you use a spritebar. Just writeimage_index = currentHP*100/maxHP - 1
Really? Ok sweet! I'l use a spritebar then.
Should I use views for that? (I'm only asking this because I believe I've seen or heard of a healthbar that is put in views)
#19
Posted 27 June 2011 - 02:42 AM
#20
Posted 27 June 2011 - 03:51 AM
Ok, do you still need help? If so tell me exactly what the issue is and I will do my best to help. Also just so you know... depth=-y sets the depth to a negative integer of your current y position in the room. While that is good in 99% of the cases in a 2d game there are times when that won't suffice.
If I need anything, I will be posting it on this thread. I really appreciate your help, but I also want to try to figure it out myself first, so I can be a better scripter.
EDIT:
I noticed you said that depth = -y does not always work...is there any better way to perform this then?
Edited by ZyronnSorrow, 30 June 2011 - 02:30 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











