simple acid block?

This is the place for discussion and support for LunaLua and related modifications and libraries.
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?
Shadowblitz16
Fighter Fly
Fighter Fly
Posts: 60
Joined: Tue Aug 09, 2016 1:41 pm

simple acid block?

Postby Shadowblitz16 » Sun Aug 14, 2016 10:33 pm

can someone help me understand how to make a simple acid block?
basicly it would be a non solid block that harms the player when touched
it would not insta kill the player only hurt him or her

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: simple acid block?

Postby PixelPest » Sun Aug 14, 2016 10:35 pm

I'd just use an NPC and make it invincible

Shadowblitz16
Fighter Fly
Fighter Fly
Posts: 60
Joined: Tue Aug 09, 2016 1:41 pm

Re: simple acid block?

Postby Shadowblitz16 » Sun Aug 14, 2016 10:42 pm

PixelPest wrote:I'd just use an NPC and make it invincible
you can kill most npc's except for the airship pieces
but you can't make them non solid it just makes mario jump off of them like they are an enemy

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: simple acid block?

Postby PixelPest » Sun Aug 14, 2016 10:44 pm

Using NPC codes or horikawaTools.lua you can. NPC codes won't be effective 100% of the time, but horikawaTools.lua has a function to make an NPC invincible and I'm pretty sure it's spot on

Shadowblitz16
Fighter Fly
Fighter Fly
Posts: 60
Joined: Tue Aug 09, 2016 1:41 pm

Re: simple acid block?

Postby Shadowblitz16 » Sun Aug 14, 2016 10:47 pm

I want to learn how to make my own Custom tiles in PGE editor
is there a video tutorial on this?

Edit: Also making the npc invincible will just make mario bounce off it like if the airship block was customized with noblocktop

User avatar
bossedit8
Toad
Toad
Posts: 6840
Joined: Fri Dec 20, 2013 12:35 pm
Current Project: Airship Attack 2
Chat Username: <3 bossedit8 <3
Contact:

Re: simple acid block?

Postby bossedit8 » Sun Aug 14, 2016 11:58 pm

Shadowblitz16 wrote:Also making the npc invincible will just make mario bounce off it like if the airship block was customized with noblocktop
What is misses is jumphurt=1. That makes it so the player goes through the NPC upon falling onto it.

User avatar
Yogi_Bear
Fighter Fly
Fighter Fly
Posts: 64
Joined: Mon Dec 29, 2014 10:00 pm
Current Project: Yogi's Episode: The Legend of Peach

Re: simple acid block?

Postby Yogi_Bear » Mon Aug 15, 2016 12:26 am

You might be able to use the firebar, since they are invulnerable, and iirc, can be resized into a block. just make sure the firebar thing is set to 0 or else it will move around.
My (now finished) Project: The Legend of Peach

Does anyone still make project banners? Mine isn't a large project or anything, but some of them look pretty snazzy. PM me if you make them, and wouldn't mind making one for me.

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: simple acid block?

Postby PixelPest » Mon Aug 15, 2016 7:12 am

Yogi_Bear wrote:You might be able to use the firebar, since they are invulnerable, and iirc, can be resized into a block. just make sure the firebar thing is set to 0 or else it will move around.
Firebars will actually still move vertically, even if NPC codes are used

User avatar
Hoeloe
Grinder
Grinder
Posts: 1026
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Current Project: A2XT Episode 2

Re: simple acid block?

Postby Hoeloe » Mon Aug 15, 2016 7:14 am

PixelPest wrote:
Yogi_Bear wrote:You might be able to use the firebar, since they are invulnerable, and iirc, can be resized into a block. just make sure the firebar thing is set to 0 or else it will move around.
Firebars will actually still move vertically, even if NPC codes are used
You can use Lua to prevent that though.

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: simple acid block?

Postby PixelPest » Mon Aug 15, 2016 7:18 am

Hoeloe wrote:
PixelPest wrote:
Yogi_Bear wrote:You might be able to use the firebar, since they are invulnerable, and iirc, can be resized into a block. just make sure the firebar thing is set to 0 or else it will move around.
Firebars will actually still move vertically, even if NPC codes are used
You can use Lua to prevent that though.
Yes. But no matter what, you can't get NPC codes to make an NPC fully invincible and stationary (there's no nohammer or noshell codes) so I assume it would probably just be best to use LunaLua right from the beginning. Also, I was just remembering something I saw the other day--SMB1 Bowser's Fireball. They stay in place if you place them into the editor with Doesn't Move checked and it might be worth looking into if those can be killed by anything because they might be usable for this concept without any LunaLua usage

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 7490
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: simple acid block?

Postby Enjl » Mon Aug 15, 2016 7:21 am

Most fire projectiles are blocked by Link's shield. I don't know if Ludwig's fire is.
ImageImageImageImage
ImageImageImageImageImageImage

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: simple acid block?

Postby PixelPest » Mon Aug 15, 2016 7:24 am

Enjl wrote:Most fire projectiles are blocked by Link's shield. I don't know if Ludwig's fire is.
Hm. Well as I mentioned earlier then, it'll probably be best to use horikawaTools.lua's makeNPCInvincible function (I think that's what it's called) or you could use a firebar/rotodisc and constantly set its x and y-speeds to 0 (or just use Doesn't Move and you'll probably only need to do y)

User avatar
Valtteri
Larry Koopa
Larry Koopa
Posts: 2156
Joined: Sun Dec 01, 2013 1:16 pm

Re: simple acid block?

Postby Valtteri » Mon Aug 15, 2016 7:45 am

You can achieve this without LunaLua. You may use either of the donut blocks or the conveyor belt and apply the following code:

Code: Select all

nohurt=0
jumphurt=1
playerblocktop=0
npcblocktop=0
playerblock=0
npcblock=0
nogravity=1
The NPC will be invincible, hurtful from all sides and the player as well as all enemies will fall/walk through it. These may even be moved by events (except the brown donut block; that may only be moved horizontally for some odd reason). I have utilized this many times. The Firebar works, too, if you set it to be the stem piece (so it will not move vertically), but these have a weird alignment and they do not use the 32x32 grid like blocks would. Plus they can't be moved by events.

But yeah, this is a common way to create so called acid blocks and I'm surprised nobody in this thread was aware of this.
Image

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 7490
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: simple acid block?

Postby Enjl » Mon Aug 15, 2016 7:51 am

PixelPest wrote:
Enjl wrote:Most fire projectiles are blocked by Link's shield. I don't know if Ludwig's fire is.
Hm. Well as I mentioned earlier then, it'll probably be best to use horikawaTools.lua's makeNPCInvincible function (I think that's what it's called) or you could use a firebar/rotodisc and constantly set its x and y-speeds to 0 (or just use Doesn't Move and you'll probably only need to do y)
It's makeNPCInvisible. No, it has nothing to do with making the NPC invincible.
Valtteri wrote:You can achieve this without LunaLua. You may use either of the donut blocks or the conveyor belt and apply the following code:

Code: Select all

nohurt=0
jumphurt=1
playerblocktop=0
npcblocktop=0
playerblock=0
npcblock=0
nogravity=1
The NPC will be invincible, hurtful from all sides and the player as well as all enemies will fall/walk through it. These may even be moved by events (except the brown donut block; that may only be moved horizontally for some odd reason). I have utilized this many times. The Firebar works, too, if you set it to be the stem piece (so it will not move vertically), but these have a weird alignment and they do not use the 32x32 grid like blocks would. Plus they can't be moved by events.

But yeah, this is a common way to create so called acid blocks and I'm surprised nobody in this thread was aware of this.
Right, completely forgot about that one. It's been a while since I used this code.
ImageImageImageImage
ImageImageImageImageImageImage

User avatar
bossedit8
Toad
Toad
Posts: 6840
Joined: Fri Dec 20, 2013 12:35 pm
Current Project: Airship Attack 2
Chat Username: <3 bossedit8 <3
Contact:

Re: simple acid block?

Postby bossedit8 » Mon Aug 15, 2016 3:02 pm

Enjl wrote:Most fire projectiles are blocked by Link's shield.
...and any other characters when they have the hammer suit and if they duck all the time.
Enjl wrote:I don't know if Ludwig's fire is.
Larry's and Ludwig's Projectiles are completly immune to everything and are completly fixaded into the air so those can work. Problem is that they don't interact with moving layers once they're onscreen.

Shadowblitz16
Fighter Fly
Fighter Fly
Posts: 60
Joined: Tue Aug 09, 2016 1:41 pm

Re: simple acid block?

Postby Shadowblitz16 » Mon Aug 15, 2016 7:49 pm

guys I wanted to make a custom acid block in PGE with lunalua
since PGE supports custom blocks

I also wanted the acid to be rendered in front of the player

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: simple acid block?

Postby PixelPest » Mon Aug 15, 2016 9:05 pm

Shadowblitz16 wrote:guys I wanted to make a custom acid block in PGE with lunalua
since PGE supports custom blocks

I also wanted the acid to be rendered in front of the player
You can't add blocks. You can only modify them. What I'd suggest though because of what you want to do with it, is use a foreground BGO and if the player is touching it, harm the player. That's relatively simple and fail proof

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

Re: simple acid block?

Postby Wohlstand » Tue Aug 16, 2016 7:01 am

PixelPest wrote:
Shadowblitz16 wrote:guys I wanted to make a custom acid block in PGE with lunalua
since PGE supports custom blocks

I also wanted the acid to be rendered in front of the player
You can't add blocks. You can only modify them. What I'd suggest though because of what you want to do with it, is use a foreground BGO and if the player is touching it, harm the player. That's relatively simple and fail proof
He meant PGE itself, if don't use legacy SMBX Engine and make levels for PGE Engine only. That you told is true for SMBX Engine which will don't take a PGE-Specific effects possible with recently implemented block-*.ini and config packs
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!
LunaLua
LunaLUA - is a LUA scripting add-on for a LunaDLL

My Media:
My MIDI-music
Pure HQ Music Pack for SMBX
Pure HQ Sound Pack for SMBX
SMBX OPL Sound pack (Created with Yamaha OPL chip and MIDI files)
SMBX38A is here
SMBX-38A download, help and support HERE (SMBX-38A (a.k.a. 1.4.x) - is Chinese unofficial continuation of SMBX)

I'm support:
Image
Image
Image


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


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest