Page 1 of 1

simple acid block?

Posted: Sun Aug 14, 2016 10:33 pm
by Shadowblitz16
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

Re: simple acid block?

Posted: Sun Aug 14, 2016 10:35 pm
by PixelPest
I'd just use an NPC and make it invincible

Re: simple acid block?

Posted: Sun Aug 14, 2016 10:42 pm
by Shadowblitz16
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

Re: simple acid block?

Posted: Sun Aug 14, 2016 10:44 pm
by PixelPest
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

Re: simple acid block?

Posted: Sun Aug 14, 2016 10:47 pm
by Shadowblitz16
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

Re: simple acid block?

Posted: Sun Aug 14, 2016 11:58 pm
by bossedit8
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.

Re: simple acid block?

Posted: Mon Aug 15, 2016 12:26 am
by Yogi_Bear
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.

Re: simple acid block?

Posted: Mon Aug 15, 2016 7:12 am
by PixelPest
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

Re: simple acid block?

Posted: Mon Aug 15, 2016 7:14 am
by Hoeloe
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.

Re: simple acid block?

Posted: Mon Aug 15, 2016 7:18 am
by PixelPest
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

Re: simple acid block?

Posted: Mon Aug 15, 2016 7:21 am
by Emral
Most fire projectiles are blocked by Link's shield. I don't know if Ludwig's fire is.

Re: simple acid block?

Posted: Mon Aug 15, 2016 7:24 am
by PixelPest
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)

Re: simple acid block?

Posted: Mon Aug 15, 2016 7:45 am
by Valtteri
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.

Re: simple acid block?

Posted: Mon Aug 15, 2016 7:51 am
by Emral
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.

Re: simple acid block?

Posted: Mon Aug 15, 2016 3:02 pm
by bossedit8
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.

Re: simple acid block?

Posted: Mon Aug 15, 2016 7:49 pm
by Shadowblitz16
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

Re: simple acid block?

Posted: Mon Aug 15, 2016 9:05 pm
by PixelPest
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

Re: simple acid block?

Posted: Tue Aug 16, 2016 7:01 am
by Wohlstand
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