How to put things in the foreground?

Need help with any SMBX game-related issues? Ask your questions here.
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on-topic/appropriate?
-Are you posting in the right forum/following the forum rules?
User avatar
Koopa Troopa
Koopa Troopa
Posts: 22
Joined: Tue May 19, 2015 8:56 pm

How to put things in the foreground?

Postby Universe--b » Thu May 21, 2015 6:07 pm

Is there a way to move things to the foreground? I'm pretty sure you can only put BGOs in the foreground, but Im not sure how? Are there just certain items that must be behind or in front of the character?

User avatar
Volcano Lotus
Volcano Lotus
Posts: 568
Joined: Fri Apr 25, 2014 12:06 pm
Current Project: None
Chat Username: Tango

Re: How to put things in the foreground?

Postby Tango » Thu May 21, 2015 6:30 pm

Only some Background Objects are Foreground type. That means that you have some foreground objects like quicksand (foreground) that you can edit the sprite to whenever you want.

If i'm not wrong, NPCs can be in the foreground. Make a NPC, make it friendly and no gravity, and put as some foreground objects.

User avatar
Posts: 4974
Joined: Fri Dec 27, 2013 7:36 am
Flair: help
Current Project: a random smw hack
Chat Username: rudeguy

Re: How to put things in the foreground?

Postby RudeGuy » Fri May 22, 2015 9:57 am

As Miles Troopa said, only some BGOs can be foreground. Look here to see which BGOs and foreground.
You can make every BGO foreground in PGE, though, but remember that this won't be saved into the .lvl file.
And about NPCs, to make them foreground you have to put foreground=1 into their NPC code, with also some necessary codes to make them act like BGOs. Do note that the foreground=1 doesn't work for some NPCs (for example rupees).
im bored

User avatar
Boom Boom
Boom Boom
Posts: 1714
Joined: Tue Feb 11, 2014 4:44 pm
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881

Re: How to put things in the foreground?

Postby Wohlstand » Fri May 22, 2015 2:35 pm

RudeGuy07 wrote:but remember that this won't be saved into the .lvl file.
...when you will use features like "Z-Layer" and "Z-Offset". Exception is allowed: To have force foreground BGO for LVL file you must follow next rules:
- Put out of section any true-foreground BGO (It's important to have our gimmick working! Level must have even one true foreground BGO, or all BGOs will be anyway rendered as background)
- Apply "SMBX sort priority" value to BGO's which you wish to use in the SMBX as "foreground": open properties box with right mouse button and set the "SMBX64 sort priority" to 70 and more. Set Z-Layer to "Foreground" just for convenience viewing in the editor. (SMBX will NOT see "Z-layer" flag)
- Save file into the LVLX and after re-save same file into LVL, when SMBX64 Sort Priority will do magic: try to run test of this level in the SMBX, BUT:
- When you run test of this level in the SMBx, NEVER save it inside SMBX, because SMBX will break customized BGO order and than BGO's will be shown by their normal state.
If you did everything right, you will see in the game than BGO's rendered as foregrounds.
PGE Project, my Media and supported projects: show
Support me on the Patreon

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 4 guests