What is the code that makes drybones collapse?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
TheGameyFireBro105
Eerie
Eerie
Posts: 702
Joined: Thu Jan 09, 2020 6:09 pm
Flair: Good at remakes
Pronouns: he/him

What is the code that makes drybones collapse?

Postby TheGameyFireBro105 » Thu Aug 06, 2020 2:50 pm

I've been trying to make Pionpi npcs, but IDK how to insert the collapsing code into a gold bowser statue.

Hoeloe
Foo
Foo
Posts: 1442
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: What is the code that makes drybones collapse?

Postby Hoeloe » Fri Aug 07, 2020 12:28 am

That's not how it works. You don't just "insert" parts of one NPCs code into another. However, all NPCs from ID 293 onwards have open source code, so you can just take a look in the scripts folder to see how they were made.

TheGameyFireBro105
Eerie
Eerie
Posts: 702
Joined: Thu Jan 09, 2020 6:09 pm
Flair: Good at remakes
Pronouns: he/him

Re: What is the code that makes drybones collapse?

Postby TheGameyFireBro105 » Fri Aug 07, 2020 10:41 am

that's the thing. I need help. I just need to know how to apply the effects of a drybones.

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9491
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: What is the code that makes drybones collapse?

Postby Enjl » Fri Aug 07, 2020 10:46 am

Fundamentally it's a state machine where in one state the dry bones walks, and in another state (triggered from onNPCKill) the dry bones doesn't walk anymore and has its hitbox disabled (npc turns friendly). That state then switches back to the other on a timer. Try to follow the modifications to data.state in the dry bones' script file.

TheGameyFireBro105
Eerie
Eerie
Posts: 702
Joined: Thu Jan 09, 2020 6:09 pm
Flair: Good at remakes
Pronouns: he/him

Re: What is the code that makes drybones collapse?

Postby TheGameyFireBro105 » Fri Aug 07, 2020 7:23 pm

This is why there should be a Lua Request forum!!!!!

ElectriKong
Posts: 4646
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Pronouns: he/him
Contact:

Re: What is the code that makes drybones collapse?

Postby ElectriKong » Sat Aug 08, 2020 3:48 am

TheGameyFireBro105 wrote:
Fri Aug 07, 2020 7:23 pm
This is why there should be a Lua Request forum!!!!!
The LunaLua help forum already serves the same purpose.

TheGameyFireBro105
Eerie
Eerie
Posts: 702
Joined: Thu Jan 09, 2020 6:09 pm
Flair: Good at remakes
Pronouns: he/him

Re: What is the code that makes drybones collapse?

Postby TheGameyFireBro105 » Sat Aug 08, 2020 10:50 am

Didn't know that

koob_koob
Spiny
Spiny
Posts: 27
Joined: Thu Aug 06, 2020 4:28 am

Re: What is the code that makes drybones collapse?

Postby koob_koob » Mon Aug 31, 2020 4:54 am

TheGameyFireBro105 wrote:
Sat Aug 08, 2020 10:50 am
Didn't know that
you probably would ask for something every 2 seconds anyway

TheGameyFireBro105
Eerie
Eerie
Posts: 702
Joined: Thu Jan 09, 2020 6:09 pm
Flair: Good at remakes
Pronouns: he/him

Re: What is the code that makes drybones collapse?

Postby TheGameyFireBro105 » Mon Aug 31, 2020 4:41 pm

koob_koob wrote:
Mon Aug 31, 2020 4:54 am
TheGameyFireBro105 wrote:
Sat Aug 08, 2020 10:50 am
Didn't know that
you probably would ask for something every 2 seconds anyway
That's a bit harsh.

koob_koob
Spiny
Spiny
Posts: 27
Joined: Thu Aug 06, 2020 4:28 am

Re: What is the code that makes drybones collapse?

Postby koob_koob » Sat Sep 05, 2020 9:58 am

TheGameyFireBro105 wrote:
Mon Aug 31, 2020 4:41 pm
koob_koob wrote:
Mon Aug 31, 2020 4:54 am
TheGameyFireBro105 wrote:
Sat Aug 08, 2020 10:50 am
Didn't know that
you probably would ask for something every 2 seconds anyway
That's a bit harsh.
well sorry, but really you need to chill with the requests sometimes


Return to “LunaLua Help”

Who is online

Users browsing this forum: cato and 2 guests