A
Agletsio
Guest
Hi,
I'm trying to figure out how to refer to a specific room in Player code sheet.
I'm currently exploring the parallax background technique and each room will need different variations of background speeds (some of them none).
At the moment I have this code in my Player object but what happens now is that this code is obviously applied to every room. How can I indicate that if Player is in this room, this will be the background speeds.
if direction = 0 and speed > 0 {
background_hspeed[2] = 1;
}
else
if direction = 180 and speed > 0 {
background_hspeed[2] = -1;
}
else
background_hspeed[2] = 0;
________________________________________________________________________________________
And then I also have a problem referring to more than one background in code (but let me know if this is a question for a new thread) as it only calls the first background I mention. So with the code below, why does only background[2] move?
if direction = 0 and speed > 0 {
background_hspeed[2] = 1;
backgroudn_hspeed[3] = 3;
}
I'm trying to figure out how to refer to a specific room in Player code sheet.
I'm currently exploring the parallax background technique and each room will need different variations of background speeds (some of them none).
At the moment I have this code in my Player object but what happens now is that this code is obviously applied to every room. How can I indicate that if Player is in this room, this will be the background speeds.
if direction = 0 and speed > 0 {
background_hspeed[2] = 1;
}
else
if direction = 180 and speed > 0 {
background_hspeed[2] = -1;
}
else
background_hspeed[2] = 0;
________________________________________________________________________________________
And then I also have a problem referring to more than one background in code (but let me know if this is a question for a new thread) as it only calls the first background I mention. So with the code below, why does only background[2] move?
if direction = 0 and speed > 0 {
background_hspeed[2] = 1;
backgroudn_hspeed[3] = 3;
}