Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] Change backgrounds in middle stage
#1
HEXers! One problem for you to solve!

How do we change backgrounds in the same stage but different levels. i.e Suppose we are at Lion forest at stage 1-2 and how to be go to the great wall in 1-3?

Any suggestions would be appreciated.
[Image: icyboards-ad-468x60.gif]
Reply
Thanks given by:
#2
There is an address which stores the current background, you need to write to it. The problem is that writing to it while a game is running will cause lf2 to crash. You will have to write to it while the screen is black and lf2 is loading the next sub-stage, and even then I don't know if it won't crash.

http://www.lf-empire.de/forum/showthread.php?tid=867

I did something similiar in boss mode. All boss fights are stage 6, yet each of them have a different background. Except the background is selected before you start the stage, not during.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by: Electric2Shock
#3
You can also do this with DC. Opoint an image, and make it go up to z-axis as much as possible. Problem is, you can only make backgrounds that are lf2-screen size (yeah there's a way to do it for more space, but it requires zero placer (correct me if I'm wrong) and other nasty stuff).

I actually have done this to Half World mod. :p
Reply
Thanks given by:
#4
(05-09-2011, 05:48 PM)Simoneon Wrote:  Problem is, you can only make backgrounds that are lf2-screen size (yeah there's a way to do it for more space, but it requires zero placer (correct me if I'm wrong) and other nasty stuff).

why as big as LF2 screen size ? you can make a large image (maybe w: 3000).
Reply
Thanks given by:
#5
Actually you can DC a two-layer background in the stage. Have one "sky" picture with state: 9997, one "foreground" picture, align them correctly and BAM! You have a perfectly faked background-change!
Reply
Thanks given by:
#6
thats only two static images still - no true parallax scrolling
Reply
Thanks given by:
#7
(05-09-2011, 07:51 PM)YinYin Wrote:  thats only two static images still - no true parallax scrolling

if the sky has a state: 9997 as lauli said, then it won't move atall, while the other image without that stave moves along when the camera moves, that IS parallax scrolling, 2 layers only, but still works :D
Reply
Thanks given by:
#8
What if a character goes all the way to the top/bottom(depending how u look at it) of the Z axis? Won't he be behind the "ball"? Especially in stage mode where the enemies have high object numbers.

Edit: Also, what about z-width? or can you get around that by using one of those weird blocking movement states?
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#9
(05-09-2011, 07:53 PM)TheNave Wrote:  that IS parallax scrolling, 2 layers only, but still works :D
i understood it but an image that doesnt move at all is still static to me - parallax scrolling is what happens in between these two

(05-09-2011, 08:07 PM)Lord Silva Wrote:  Won't he be behind the "ball"? Especially in stage mode where the enemies have high object numbers.

can you get around that by using one of those weird blocking movement states?
perfect fix
also i havent experienced it to be a problem so far if the image in the background keeps using the hit_j tag to move up (and if its one of the first objects created isnt it always drawn before all the other characters with higher object numbers? -> thus characters get drawn in front of it)
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)