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.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.
LunaDLL/LunaLUA help thread
Re: LunaDLL help thread
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
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?
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?
Re: LunaDLL help thread
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.
Re: LunaDLL help thread
...I have no reserve box. My episode has Toad and LinkKil 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.
Re: LunaDLL help thread
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.
Re: LunaDLL help thread
Can auto code refer to variables set by lua?
-
- Banned
- Posts: 0
- Joined: 13 years ago
- First name: Stephen
- Location: Holstaurus Heaven
Re: LunaDLL help thread
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.
-
- Posts: 0
- Joined: 9 years ago
Re: LunaDLL help thread
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.
Re: LunaDLL help thread
I'm working on a GUI framework actually which will help with that
If they're user variables in the variable bankTiKi wrote:Can auto code refer to variables set by lua?
If lunadll is controlling your layers, I think that's already the caseSeptentrion 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.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
-
- Banned
- Posts: 0
- Joined: 13 years ago
- First name: Stephen
- Location: Holstaurus Heaven
Re: LunaDLL help thread
That doesn't solve the problem of the player phasing into layers when they get hurt like in today's episode or Fluffy Quest.Kil wrote:If lunadll is controlling your layers, I think that's already the caseSeptentrion 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.
-
- https://www.youtube.com/watch?v=BODxOghVmko
- Posts: 1812
- Joined: 10 years ago
- First name: Mack
- https://rixithechao.talkhaus.com/
Re: LunaDLL help thread
hype mode activateKil wrote:I'm working on a GUI framework actually which will help with that
Delightful Adventure Enhanced is out now!
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)
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)
Re: LunaDLL help thread
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.Septentrion Pleiades wrote:That doesn't solve the problem of the player phasing into layers when they get hurt like in today's episode or Fluffy Quest.Kil wrote:If lunadll is controlling your layers, I think that's already the caseSeptentrion 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.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
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.
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.
Re: LunaDLL help thread
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.
- Oddwrath
- The ghost of talkhaus unlikely
- Posts: 95
- Joined: 9 years ago
- Pronouns: she/her
- Location: Merry Old Europe
Re: LunaDLL help thread
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?
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
Re: LunaDLL help thread
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.
Re: LunaDLL help thread
Be a better way to display HUDs than PlaceSpriteTiKi wrote:What would the GUI do exactly?
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
Not necessarily. If we could find out the screen coordinates in world space, then a transformation should be a relatively simple procedure.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
Re: LunaDLL help thread
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.
Re: LunaDLL help thread
Hmm... that's a point. You could counter that by taking Demo's velocity into account, too, I guess.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.
Re: LunaDLL help thread
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?
Re: LunaDLL help thread
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.
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.
Re: LunaDLL help thread
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?
-
- https://www.youtube.com/watch?v=BODxOghVmko
- Posts: 1812
- Joined: 10 years ago
- First name: Mack
- https://rixithechao.talkhaus.com/
Re: LunaDLL help thread
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!
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)
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)