Bright Future - Can you test this in the final 48 hours???

Subforum for the SMBX Chocolate Level Contest 2021.
Cro-Iba
Goomba
Goomba
Posts: 3
Joined: Sun Jul 04, 2021 6:43 pm
Pronouns: he/him
Contact:

Bright Future - Can you test this in the final 48 hours???

Postby Cro-Iba » Sun Jul 04, 2021 7:06 pm

Level link is here!

Still wanna add a couple of assets, so it's not fully representative of the aesthetic of the level, but the rest is all there.

--------------
Original post:
Hi, I don't have a WIP here yet (and I will surely post it when I do), but I do have some LunaLua questions.

I have an NPC that I want to act as a projectile as in it harms other NPCS, but I also want it to pass through blocks. Mem offset 0x136 forces it to behave like a fireball and bounce off walls, which I don't want, but there's no other way I can see to have it harm NPCS. I figured there'd be some way to change if an object was considered "thrown" or not, but if there is, I can't see it. I also want this NPC to have arbitrary behavior when it collides with the player, but the only way I believe I can grab an NPC+player collision is through harm, and if I modify the harm interrupt, it would necessarily have to be for all NPCs, since the method doesn't have a culprit argument.

I hope there aren't obvious solutions to these I've missed in the docs, but if you can point me to some ideas it would be greatly appreciated!
Last edited by Cro-Iba on Sat Aug 14, 2021 3:01 am, edited 1 time in total.

MrDoubleA
Flurry
Flurry
Posts: 384
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

Re: Hot contest entry goes here eventually!

Postby MrDoubleA » Mon Jul 05, 2021 6:30 am

Cro-Iba wrote:
Sun Jul 04, 2021 7:06 pm
Hi, I don't have a WIP here yet (and I will surely post it when I do), but I do have some LunaLua questions.

I have an NPC that I want to act as a projectile as in it harms other NPCS, but I also want it to pass through blocks. Mem offset 0x136 forces it to behave like a fireball and bounce off walls, which I don't want, but there's no other way I can see to have it harm NPCS. I figured there'd be some way to change if an object was considered "thrown" or not, but if there is, I can't see it. I also want this NPC to have arbitrary behavior when it collides with the player, but the only way I believe I can grab an NPC+player collision is through harm, and if I modify the harm interrupt, it would necessarily have to be for all NPCs, since the method doesn't have a culprit argument.

I hope there aren't obvious solutions to these I've missed in the docs, but if you can point me to some ideas it would be greatly appreciated!
You can just harm colliding NPC's like so:

Code: Select all

for _,npc in ipairs(Colliders.getColliding{a = v,b = NPC.HITTABLE,btype = Colliders.NPC}) do
    npc:harm(HARM_TYPE_NPC)
end
For player stuff, you can do similar with Player.getIntersecting.

(Also: why not just put this question in LunaLua help?)

Cro-Iba
Goomba
Goomba
Posts: 3
Joined: Sun Jul 04, 2021 6:43 pm
Pronouns: he/him
Contact:

Re: Hot contest entry goes here eventually!

Postby Cro-Iba » Mon Jul 05, 2021 3:35 pm

Thank you; a class like Colliders was exactly what I was looking for.

I figured I was going to make this thread eventually for testing purposes, and making two threads when I could make one was pointlessly bloaty :V

Cro-Iba
Goomba
Goomba
Posts: 3
Joined: Sun Jul 04, 2021 6:43 pm
Pronouns: he/him
Contact:

Re: Bright Future - Can you test this in the final 48 hours???

Postby Cro-Iba » Sat Aug 14, 2021 3:04 am

Well, I should've updated this at least a couple of days sooner than this, but if anyone wants to take a crack at my level, there's a link in the OP!

No sweat if no one does though for obvious reasons. It's not a very long level but it might take some practice.

EDIT: I have also left a devtesting number display in. Whoops! Ignore that.


Return to “ChoccyCon 2021”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari