(shouting)

LunaDLL/LunaLUA help thread

The second SMBX collab!
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

TiKi wrote:Okay so I know how to make the dragon coins into money. How would one go about buying stuff though? I was thinking of hit a block to buy the item... But I don't think lunadll can activate upon SMBX events? And I'd be re using a block type (the message block) for all buying blocks.
There are many choices for doing that, such as custom cheat, blocktrigger, TriggerZone and OnInput, and LuaTrigger. Hell you could even make a custom powerup that is only collected when you touch it and have the right amount of currency. Basically I dunno why you're still using the SMBX event system.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
TiKi
Posts: 709
Joined: 11 years ago

Re: LunaDLL help thread

Post by TiKi »

It's just the easiest thing to do really for me.

Re: block trigger: so you have to use different blocks if you want different stuff to happen when you touch them?

And how would I go about making a single-activate event that can be re-triggered after re entering the level? Like you touch a block or type a cheat, it triggers a SMBX event that shows a layer, and subtracts coins, but I don't want the player to keep spending money once they exhaust the layer's supply of powerups. How would I do this? Would it need variables?
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

Again there's so many ways to do that, the best implementation depends on how your level is designed and what you want to happen. The easiest way would be to ignore showing SMBX layers and just put the correct powerup into their reserve box.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
TiKi
Posts: 709
Joined: 11 years ago

Re: LunaDLL help thread

Post by TiKi »

Kil wrote:Again there's so many ways to do that, the best implementation depends on how your level is designed and what you want to happen. The easiest way would be to ignore showing SMBX layers and just put the correct powerup into their reserve box.
...I have no reserve box. My episode has Toad and Link
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

Then it's even simpler. You can just set their powerup state directly.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
TiKi
Posts: 709
Joined: 11 years ago

Re: LunaDLL help thread

Post by TiKi »

Can auto code refer to variables set by lua?
Septentrion Pleiades
Banned
Posts: 0
Joined: 13 years ago
First name: Stephen
Location: Holstaurus Heaven

Re: LunaDLL help thread

Post by Septentrion Pleiades »

It would be very useful to have the player remain tangible when they get hurt. It would also be useful to have triggers/layer continue playing as if nothing happened. So many type of levels would be fixed by that.
Image
Image
Image
Darkchaox100
Posts: 0
Joined: 9 years ago

Re: LunaDLL help thread

Post by Darkchaox100 »

Kil might you be able to make the custom text act like the HUD? its kinda weird if you add New stuff to the HUD but it will be deactivated as soon as you pause the game or a message will be drawn.
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

I'm working on a GUI framework actually which will help with that
TiKi wrote:Can auto code refer to variables set by lua?
If they're user variables in the variable bank
Septentrion Pleiades wrote:It would be very useful to have the player remain tangible when they get hurt. It would also be useful to have triggers/layer continue playing as if nothing happened. So many type of levels would be fixed by that.
If lunadll is controlling your layers, I think that's already the case
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Septentrion Pleiades
Banned
Posts: 0
Joined: 13 years ago
First name: Stephen
Location: Holstaurus Heaven

Re: LunaDLL help thread

Post by Septentrion Pleiades »

Kil wrote:
Septentrion Pleiades wrote:It would be very useful to have the player remain tangible when they get hurt. It would also be useful to have triggers/layer continue playing as if nothing happened. So many type of levels would be fixed by that.
If lunadll is controlling your layers, I think that's already the case
That doesn't solve the problem of the player phasing into layers when they get hurt like in today's episode or Fluffy Quest.
Image
Image
Image
Rixithechao
https://www.youtube.com/watch?v=BODxOghVmko
Posts: 1812
Joined: 10 years ago
First name: Mack
https://rixithechao.talkhaus.com/

Re: LunaDLL help thread

Post by Rixithechao »

Kil wrote:I'm working on a GUI framework actually which will help with that
hype mode activate
Delightful Adventure Enhanced is out now!

Image

There's an official ASMT Discord server! Check it out to discuss Demo games and follow their development! thread, invite link

(Entry requires verification, either with a connected Youtube/Twitter/Twitch/etc account or manually by the server staff.)


Itch.io (albums and eventually games), Youtube (dofur pass and I guess other videos)
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

Septentrion Pleiades wrote:
Kil wrote:
Septentrion Pleiades wrote:It would be very useful to have the player remain tangible when they get hurt. It would also be useful to have triggers/layer continue playing as if nothing happened. So many type of levels would be fixed by that.
If lunadll is controlling your layers, I think that's already the case
That doesn't solve the problem of the player phasing into layers when they get hurt like in today's episode or Fluffy Quest.
Those two are kind of the opposite. If you want layers moving while you're hurt, well you're going to get stuck in the layer sometimes. If the layers don't move, then you can't get stuck in them.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaDLL help thread

Post by Hoeloe »

Is there a way to draw text in world space rather than screen space? It would make a few things in-game much easier to manage.

Oh also, placeSprite for me seems to place the images permanently, meaning if I move them, it causes "trails" where old positions of the sprite are not removed.

EDIT: Managed to fix the placeSprite issue by setting the time value to "2". Lower than that didn't seem to work.
Image
Image
Image
Image
Image
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

At the moment not really, and that showtext function of SMBX only takes static screen coords, so it'll always be limited in that regard
DON'T PM me. Ask your question in the help thread so everyone can be answered.
User avatar
Oddwrath
The ghost of talkhaus unlikely
Posts: 95
Joined: 9 years ago
Pronouns: she/her
Location: Merry Old Europe

Re: LunaDLL help thread

Post by Oddwrath »

Is there any way to prevent the player from gaining a 2up after several consecutive jumps and instead make him go back to 100 and resetting the whole cycle?
:lesbian_pride: my avatar is from that obake game made in 2001 that you cannot play anymore unless you run it through a virtual machine and apply a locale patch
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

Use this

Code: Select all

function onLoop()
  if(player:mem(0x56, FIELD_WORD) > 8) then
    player:mem(0x56, FIELD_WORD, 0)
	end
  end
DON'T PM me. Ask your question in the help thread so everyone can be answered.
TiKi
Posts: 709
Joined: 11 years ago

Re: LunaDLL help thread

Post by TiKi »

What would the GUI do exactly?
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

TiKi wrote:What would the GUI do exactly?
Be a better way to display HUDs than PlaceSprite
DON'T PM me. Ask your question in the help thread so everyone can be answered.
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaDLL help thread

Post by Hoeloe »

Kil wrote:At the moment not really, and that showtext function of SMBX only takes static screen coords, so it'll always be limited in that regard
Not necessarily. If we could find out the screen coordinates in world space, then a transformation should be a relatively simple procedure.
Image
Image
Image
Image
Image
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

Well you can already get that based on demo's position and the section boundaries. The only issue you're going to run into is that those coordinates will be 1 frame old by the time they're displayed.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaDLL help thread

Post by Hoeloe »

Kil wrote:Well you can already get that based on demo's position and the section boundaries. The only issue you're going to run into is that those coordinates will be 1 frame old by the time they're displayed.
Hmm... that's a point. You could counter that by taking Demo's velocity into account, too, I guess.
Image
Image
Image
Image
Image
TiKi
Posts: 709
Joined: 11 years ago

Re: LunaDLL help thread

Post by TiKi »

Okay, could I please have an example code that when you touch block ID 5, it activates a event that drains 3 of the RaoCoins variable and activate a SMBX event?
Kil
Posts: 13
Joined: 15 years ago

Re: LunaDLL help thread

Post by Kil »

So you're absolutely dead-set on doing this in the worst possible way huh

You know that when you touch the block you'll probably touch it for several frames, meaning that you'll activate the purchase multiple times? Also if your level isn't for a2mbxt then I'm not doing it unless you send me the level so I can test that the code works.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
TiKi
Posts: 709
Joined: 11 years ago

Re: LunaDLL help thread

Post by TiKi »

I guess I can use custom cheats, but I don't know how to make it only avaliable once per level visit. Is that what Delete Events From is for?
Rixithechao
https://www.youtube.com/watch?v=BODxOghVmko
Posts: 1812
Joined: 10 years ago
First name: Mack
https://rixithechao.talkhaus.com/

Re: LunaDLL help thread

Post by Rixithechao »

Why not use a timer to prevent it from triggering in the subsequent frames? The event only activates if the timer is inactive, and then it sets the timer to half a second or so.
Delightful Adventure Enhanced is out now!

Image

There's an official ASMT Discord server! Check it out to discuss Demo games and follow their development! thread, invite link

(Entry requires verification, either with a connected Youtube/Twitter/Twitch/etc account or manually by the server staff.)


Itch.io (albums and eventually games), Youtube (dofur pass and I guess other videos)
Post Reply