Share and discuss custom LunaLua code and content packs for SMBX2.
Moderator: Userbase Moderators
|
|
|
|
-
loop
- Ninji

- Posts: 984
- Joined: Sun Apr 17, 2016 5:56 pm
- Flair: i may be dumb but im not stupid!
- Pronouns: he/him/they
Postby loop » Fri Apr 07, 2017 6:41 pm
Mario Maker 200 wrote:Awesome! But I don't have the imagic.lua and I can't find a download for it...
It comes with 2.0. My project uses it.
|
|
|
|
|
|
|
|
|
-
PlumberGraduate
- Fighter Fly

- Posts: 38
- Joined: Sat Jun 14, 2014 11:39 am
Postby PlumberGraduate » Sat Apr 08, 2017 3:14 am
Jayce 777 wrote:Mario Maker 200 wrote:Awesome! But I don't have the imagic.lua and I can't find a download for it...
It comes with 2.0. My project uses it.
Ok, thanks! 
|
|
|
|
|
|
|
|
|
-
Alagirez
- Ludwig von Koopa

- Posts: 3608
- Joined: Tue Dec 02, 2014 2:28 am
- Flair: Legalize Awooo!
- Pronouns: He/Him/That wolf
-
Contact:
Postby Alagirez » Sat Apr 08, 2017 3:19 am
Wow this is pawsome! Finally I can hide my easter eggs in my levels with this API(?)!
|
|
|
|
|
|
|
|
|
-
Sambo
- Snifit

- Posts: 211
- Joined: Fri Jan 24, 2014 6:43 pm
Postby Sambo » Sat Apr 08, 2017 4:30 pm
It's in 2.0 beta 3
|
|
|
|
|
|
|
|
|
-
PersonNamedUser
- Reznor

- Posts: 2882
- Joined: Fri Feb 27, 2015 8:07 pm
Postby PersonNamedUser » Thu Feb 22, 2018 11:12 pm
bumpty bumpty
I have a couple questions about this
1. are npcs hidden by this?
2. does the nsmbwalls layer need to be hidden or shown while actually testing the level?
|
|
|
|
|
|
|
|
|
-
HulluHapua
- Goomba

- Posts: 1
- Joined: Sat Sep 02, 2017 9:26 am
-
Contact:
Postby HulluHapua » Fri Feb 23, 2018 3:55 am
You Can Simply Use Sizable Objects For Fake Walls Since They Only Have Collision On The Top Of Them.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Fri Feb 23, 2018 6:09 am
HulluHapua wrote:You Can Simply Use Sizable Objects For Fake Walls Since They Only Have Collision On The Top Of Them.
But then there's no visual effect like in NSMB
|
|
|
|
|
|
|
|
|
-
Sambo
- Snifit

- Posts: 211
- Joined: Fri Jan 24, 2014 6:43 pm
Postby Sambo » Fri Feb 23, 2018 2:01 pm
Mosaic wrote:bumpty bumpty
I have a couple questions about this
1. are npcs hidden by this?
Yes. The "fake wall" effect is rendered above NPCs.
Mosaic wrote:2. does the nsmbwalls layer need to be hidden or shown while actually testing the level?
It needs to be hidden. If it's shown, the player can interact with the blocks on it.
HulluHapua wrote:You Can Simply Use Sizable Objects For Fake Walls Since They Only Have Collision On The Top Of Them.
That Thing You Do Where You Capitalize All Your Words Is Annoying. Stop It.
Also, yeah, that doesn't work.
|
|
|
|
|
|
|
|
|
-
8lue Storm
- Volcano Lotus

- Posts: 595
- Joined: Thu Jan 18, 2018 9:53 am
- Flair: its pronounced bluestorm
Postby 8lue Storm » Tue Apr 03, 2018 8:47 pm
Sorry for the bump, but I tried to test this feature, following MechDragon777's instructions, but this showed up:

Can someone please tell me what went wrong?
|
|
|
|
|
|
|
|
|
-
The0x539
- Eerie

- Posts: 751
- Joined: Fri Jan 22, 2016 8:02 pm
Postby The0x539 » Tue Apr 03, 2018 9:13 pm
8lue Storm wrote:Sorry for the bump, but I tried to test this feature, following MechDragon777's instructions, but this showed up:

Can someone please tell me what went wrong?
The library is being instructed to draw a GIF. This generally doesn't work in Beta 3. Use PNG graphics.
|
|
|
|
|
|
|
|
|
-
8lue Storm
- Volcano Lotus

- Posts: 595
- Joined: Thu Jan 18, 2018 9:53 am
- Flair: its pronounced bluestorm
Postby 8lue Storm » Tue Apr 03, 2018 9:36 pm
[quote="The0x539"][quote="8lue Storm"]Sorry for the bump, but I tried to test this feature, following MechDragon777's instructions, but this showed up:
[img] https://s31.postimg.org/kfzmltkyj/Fake_Walls_Error.png[/img]
Can someone please tell me what went wrong?[/quote]
The library is being instructed to draw a GIF. This generally doesn't work in Beta 3. Use PNG graphics.[/quote]
I made .png only what I used as fake walls. I guess I should make everything .png, then. Thanks for the advice!
|
|
|
|
|
|
|
|
|
-
Park Ocean
- Hoopster

- Posts: 48
- Joined: Thu Feb 22, 2018 12:42 am
- Pronouns: They/He
Postby Park Ocean » Tue Apr 24, 2018 2:21 am
Ok. This is really good but when i looked at the instructions on the PGE Wiki but it didn't really make sense to me.
Which Lunadll.lua file do i use?
Hopefully you make a video tutorial because i really don't get it.
But I love this!!!
|
|
|
|
|
|
|
|
|
-
MrVaderSpino
- Swooper

- Posts: 66
- Joined: Tue Apr 24, 2018 9:09 am
Postby MrVaderSpino » Wed May 02, 2018 11:30 pm
That is understand but i want to find the star or Key once it can make more levels.
|
|
|
|
|
|
|
|
|
-
FirestarPlays
- Chain Chomp

- Posts: 301
- Joined: Tue Feb 28, 2017 1:26 pm
- Pronouns: he/him
Postby FirestarPlays » Thu May 03, 2018 5:20 pm
My episode is actually going to use this, starting with 2-5: Fakewall Flank!
|
|
|
|
|
|
|
|
|
-
Novarender
- Tweeter

- Posts: 145
- Joined: Sat Aug 06, 2016 6:59 pm
- Flair: Whoa
Postby Novarender » Tue Nov 06, 2018 8:22 pm
What part of the code draws the nsmbwalls layer as transparent (when player is behind the layer)? Because I want to change it to be more like the original and not draw the blocks at all.
*nevermind
|
|
|
|
|
|
|
|
|
-
IAmPlayer
- Volcano Lotus

- Posts: 560
- Joined: Sun May 21, 2017 3:36 am
- Flair: I'm a hellspawn.
- Pronouns: he/him
-
Contact:
Postby IAmPlayer » Fri Apr 12, 2019 10:34 am
So, this is pretty recent, and only happens in MaGLX3 build, but this is broken. The stuff inside are not the walls that was suppose to hide the layer in a lower opacity and the stuff underneath it, but instead, a zoomed out version of what's underneath.

Do you think you can fix this?
|
|
|
|
|
|
|
|
|
-
Eri7
- Banned
- Posts: 1770
- Joined: Sat Jan 28, 2017 4:48 pm
- Flair: Good Foundation allows for strong Execution
-
Contact:
Postby Eri7 » Fri Apr 12, 2019 11:56 am
Oh no that's really bad especially for one of the projects I am working on. Let's hope Sambo fixed this or rip very cool script.
|
|
|
|
|
|
|
|
|
-
hacheipe399
- Swooper

- Posts: 64
- Joined: Mon Feb 10, 2014 12:29 pm
Postby hacheipe399 » Mon Aug 12, 2019 10:47 pm
Hey everyone, I found a quick workaround for this API in the latest SMBX2 PAL Release. You need to locate two lines of code which contain the imagic's ScaleTexture() method. These are within a loop in nsmbwalls.update() event:
Code: Select all xRays[k]:ScaleTexture((800) / (2 * r), (600) / (2 * r))
and this one:
Code: Select all overlays[k]:ScaleTexture((800) / (2 * r), (600) / (2 * r))
Replace the multipliers of the radious (variable "r") in this way:
Code: Select all xRays[k]:ScaleTexture((800) / (19.8 * r), (600) / (11.3 * r))
Code: Select all overlays[k]:ScaleTexture((800) / (19.8 * r), (600) / (11.3 * r))
And there you go. This makes the camera to shrink too, which isn't a desired behavior, but it's a minor detail. I planned to rewrite this API since imagic isn't recommended anymore, but this fix does the job btw.
|
|
|
|
|
|
|
|
|
-
MECHDRAGON777
- Pink Yoshi Egg

- Posts: 6422
- Joined: Fri Dec 20, 2013 6:40 pm
- Flair: Nuclear Queen of Reversion.
-
Contact:
Postby MECHDRAGON777 » Mon Aug 12, 2019 10:54 pm
hacheipe399 wrote: ↑Mon Aug 12, 2019 10:47 pm
Hey everyone, I found a quick workaround for this API in the latest SMBX2 PAL Release. You need to locate two lines of code which contain the imagic's ScaleTexture() method. These are within a loop in nsmbwalls.update() event:
Code: Select all xRays[k]:ScaleTexture((800) / (2 * r), (600) / (2 * r))
and this one:
Code: Select all overlays[k]:ScaleTexture((800) / (2 * r), (600) / (2 * r))
Replace the multipliers of the radious (variable "r") in this way:
Code: Select all xRays[k]:ScaleTexture((800) / (19.8 * r), (600) / (11.3 * r))
Code: Select all overlays[k]:ScaleTexture((800) / (19.8 * r), (600) / (11.3 * r))
And there you go. This makes the camera to shrink too, which isn't a desired behavior, but it's a minor detail. I planned to rewrite this API since imagic isn't recommended anymore, but this fix does the job btw.
I think QuantumMeanance gave me a version which involved inverting something. Maybe s/he could upload her/his version or explain her/his change publicly?
|
|
|
|
|
|
|
|
|
-
hacheipe399
- Swooper

- Posts: 64
- Joined: Mon Feb 10, 2014 12:29 pm
Postby hacheipe399 » Mon Aug 12, 2019 11:50 pm
THIS IS THE DEFINITIVE WORKAROUND:
EDIT: you just can get rid of the xRays[k]:ScaleTexture() and overlays[k]:ScaleTexture() lines, but watch out the following step:
Before each ScaleTexture, imagic.Circle{} is assigned to xRays and overlays respectively. Look for "filltype", then change imagic.TEX_FILL for imagic.TEX_PLACE. For example:
Code: Select all xRays[k] = imagic.Circle
{
radius = r,
x = playerCenterX,
y = playerCenterY,
scene = true,
texture = xRayBuffer,
filltype = imagic.TEX_PLACE,
texoffsetX = (centerOnScreenX - 400)/800,
texoffsetY = (centerOnScreenY - 300)/600
}
And now we're done! Now it is exactly zoomed and the effect works properly!
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 2 guests
|