This is the place for discussion and support for LunaLua and related modifications and libraries.
Moderator: Userbase Moderators
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
- Swooper

- Posts: 62
- Joined: Tue Aug 09, 2016 1:41 pm
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
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sun Aug 14, 2016 10:35 pm
I'd just use an NPC and make it invincible
|
|
|
|
|
|
|
|
|
-
Shadowblitz16
- Swooper

- Posts: 62
- Joined: Tue Aug 09, 2016 1:41 pm
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
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
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
- Swooper

- Posts: 62
- Joined: Tue Aug 09, 2016 1:41 pm
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
|
|
|
|
|
|
|
|
|
-
bossedit8
- Banned
- Posts: 6838
- Joined: Fri Dec 20, 2013 12:35 pm
-
Contact:
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.
|
|
|
|
|
|
|
|
|
-
Yogi_Bear
- Swooper

- Posts: 64
- Joined: Mon Dec 29, 2014 10:00 pm
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.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
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
|
|
|
|
|
|
|
|
|
-
Hoeloe
- Phanto

- Posts: 1465
- Joined: Sat Oct 03, 2015 6:18 pm
- Flair: The Codehaus Girl
- Pronouns: she/her
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.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
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
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9891
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » 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.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
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)
|
|
|
|
|
|
|
|
|
-
Valtteri
- Birdo

- Posts: 2150
- Joined: Sun Dec 01, 2013 1:16 pm
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.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9891
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » 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.
|
|
|
|
|
|
|
|
|
-
bossedit8
- Banned
- Posts: 6838
- Joined: Fri Dec 20, 2013 12:35 pm
-
Contact:
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
- Swooper

- Posts: 62
- Joined: Tue Aug 09, 2016 1:41 pm
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
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
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
|
|
|
|
|
|
|
|
|
-
Wohlstand
- Chargin' Chuck

- Posts: 2008
- Joined: Tue Feb 11, 2014 4:44 pm
- Flair: [ˈvoːlˌʃtant], 狐エンジニア
- Pronouns: he/him
-
Contact:
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
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 1 guest
|