Any way to make a level warp vertically?

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
Oshi
Grinder
Grinder
Posts: 1068
Joined: Sun Aug 16, 2015 12:34 pm
Flair: I like Pokemon GO fite me
Current Project: Mostly nothing
Location: You will never know...

Any way to make a level warp vertically?

Postby Oshi » Sun Sep 03, 2017 7:27 pm

There's on option for it in the PGE editor in 2.0 Beta3, but it's grayed out and unselectable. How do are you supposed to make it selectable?
IF YOU WANT TO PLAY MAFIA THEN GO TO MOSAICMAFIA OR MINIGAME PLAZA PLEASE. WE NEED PEOPLE TO PLAY GAMES.
Spoiler: show
I claim Audino as best girl and waifu, also have this image:
Image
projects I support: show
Image

Image
My own Discord server: https://discord.gg/YgfWZjn

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2830
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Location: http://www.stardustfields.net/files/cool.gif
Contact:

Re: Any way to make a level warp vertically?

Postby HenryRichard » Sun Sep 03, 2017 11:24 pm

You can't currently. You'll have to do it with Lua.
Image

I'm on Soundcloud | My graphics pack!

Jesus is my savior.

User avatar
Pseudo
Tellah
Tellah
Posts: 5544
Joined: Wed Jan 08, 2014 12:04 am
Current Project: ???
Location: the atlantic coast

Re: Any way to make a level warp vertically?

Postby Pseudo » Mon Sep 04, 2017 12:08 am

Grayed out PGE options indicate that they're features of the (currently in Alpha) PGE engine, separate from SMBX I believe. As HenryRichard said, you'll have to use Lua if you want to implement this in SMBX.
Love and Tolerance FTW!!
previously Pseudo-dino but you probably guessed that yourself

come visit my YouTube channel, where I play games (including smbx)

"sterydy Behemoth expiable novae iconically night owl ticklish turbocharger bactrian riveting . Solidus quits frothy managua scrimper shadowy enthusiastically rearrangement curviness matronliness pinyin piroshki gradual hysterically locker room versed . Horrendous unicorn transnational parka lasso very forbiddingly laborsaving cochabamba hair-raising floozy philter transnational ."
- a spam account 2016

My Switch friend code: 1353 - 7698 - 1308 (add me!)

so... i'm actually a girl

User avatar
Electriking
Bowser
Bowser
Posts: 3615
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here.
Current Project: Not Mushroom Kingdom Massacre ATM
Location: Inverted Realm
Chat Username: ElectriKing

Re: Any way to make a level warp vertically?

Postby Electriking » Mon Sep 04, 2017 2:07 am

The greyed out features will likely be available in the future (either in a future version of 2.0 or when PGE is fully released and replaces SMBX).

The best way to make vertically wraping is to use instant warps although they don't really work very well.
Join my Discord server
Check out Mushroom Kingdom Massacre. We need team members
My Nintendo Switch Friend Code: SW-2812-3564-4900
Quotes: show
Horikawa Otane wrote:lol
thehelmetguy1 wrote:I wonder who was the idiot that made the fake beta 4 announcement
Enjl wrote:Apologies for knowing how to research.
PixelPest wrote:
The0x539 wrote:
IceQracker92 wrote:a good cable/internet provider such as Comcast.
Image
Literally me when I read that post lol
The0x539 wrote:
Teemster2 wrote:the Ox
Image
Danny wrote:Here's some constructive criticism: What the hell?
WARNING: Quill is in here: show
Image

User avatar
The0x539
Nipper Plant
Nipper Plant
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm
Current Project: SMBX2

Re: Any way to make a level warp vertically?

Postby The0x539 » Mon Sep 04, 2017 9:58 am

Electriking wrote:The best way to make vertically wraping is to use instant warps although they don't really work very well.
Then it's clearly not the best way, because the vertical wrap in Hypnosis Redo's intro level is s l i c k.

ClapClop
Goomba
Goomba
Posts: 1
Joined: Tue Oct 09, 2018 6:14 pm
Chat Username: CC
Contact:

Re: Any way to make a level warp vertically?

Postby ClapClop » Tue Oct 09, 2018 6:21 pm

HenryRichard wrote:
Sun Sep 03, 2017 11:24 pm
You can't currently. You'll have to do it with Lua.
I did not understand, how I use lua to be able to use the warp vertically

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2830
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Location: http://www.stardustfields.net/files/cool.gif
Contact:

Re: Any way to make a level warp vertically?

Postby HenryRichard » Tue Oct 09, 2018 8:40 pm

ClapClop wrote:
Tue Oct 09, 2018 6:21 pm
HenryRichard wrote:
Sun Sep 03, 2017 11:24 pm
You can't currently. You'll have to do it with Lua.
I did not understand, how I use lua to be able to use the warp vertically
Throw something like this in your onTick() function. You'll have to change the coordinates to match your section's, and probably limit it to the current section as well.

Code: Select all

if player.y >= -140000 then --coords
			player.y = -140632
		end
		if player.y <= -140638 then
			player.y = -140004
		end
This code is from Hypnosis Redo - I don't know if Enjl wants credit for this or not (more likely than not he doesn't care, but I'd be on the safe side).
Image

I'm on Soundcloud | My graphics pack!

Jesus is my savior.

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 6565
Joined: Mon Jan 20, 2014 12:58 pm
Flair: -chan ^^

Re: Any way to make a level warp vertically?

Postby Enjl » Wed Oct 10, 2018 1:06 am

HenryRichard wrote:
Tue Oct 09, 2018 8:40 pm
ClapClop wrote:
Tue Oct 09, 2018 6:21 pm
HenryRichard wrote:
Sun Sep 03, 2017 11:24 pm
You can't currently. You'll have to do it with Lua.
I did not understand, how I use lua to be able to use the warp vertically
Throw something like this in your onTick() function. You'll have to change the coordinates to match your section's, and probably limit it to the current section as well.

Code: Select all

if player.y >= -140000 then --coords
			player.y = -140632
		end
		if player.y <= -140638 then
			player.y = -140004
		end
This code is from Hypnosis Redo - I don't know if Enjl wants credit for this or not (more likely than not he doesn't care, but I'd be on the safe side).
Someone in codehaus needed vertical wrap recently so here's a more dynamic variant:

Code: Select all

local _scrollSections = {0, 1, 2}

local scrollSectionMap = {}

for k,v in ipairs(scrollSections) do
    scrollSectionMap[v] = true
end

local allNPCIDs = {}
for i=1, 300 do
    allNPCIDs[i] = i
end

function onTickEnd()

    local checkedNPCSections = {}
    for _,p in ipairs(Player.get()) do
        if scrollSectionMap[p.section] then
            local s = Section(p.section)
            local b = s.boundary
	    local sheight = b.bottom - b.top + 32
            if p.y > b.bottom + 16 then
                p.y = p.y - sheight
            elseif p.y + p.height < b.top - 16 then
                p.y = p.y + sheight
            end
            if not checkedNPCSections[p.section] then
                for k,v in ipairs(NPC.get(allNPCIDs, p.section)) do
                    if v:mem(0x12A, FIELD_WORD) > 0 then
                        if v.y > v.bottom + 16 then
                            v.y = v.y - sheight
                        elseif v.y + v.height < v.top - 16 then
                            v.y = v.y + sheight
                        end
                    end
                end
            end
            checkedNPCSections[p.section] = true
        end
    end
end
Just adjust scrollSections with the section numbers you want to scroll. Remember that section numbers are 0-indexed so Section 1 in the editor is Section 0 in game.

No credit needed.
ImageImageImageImage
ImageImageImageImageImageImage
Muh favourite quotes:
Spoiler: show
TheKingOfBoos: enji I'm only scared of you cuz you're always right, and that's creepy
SnoruntPyro: if you don't like kirby you have no life
ToonQuill: do you have any hentai girl sfx
Pichu: "And Jesus said unto his apostles, 'ew so much clash 0/10'."
MNIE52: ohoho master king sitting in his golden chair! Dude, you think you're president? i will not leave, if i want - i'll leave.
MNIE52: i will not kill you, why you so rude. are you have nothing to do, boy?
Sanct: oh my god i made the perfect amount of stairs i am jesus christ.
Spoiler: show
Image


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 10 guests