Dry Bones that throws Bones

Description: Have idea for a script, but you can't make it? Post it here!
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

fnafan8888888888 M
Topic author, Count
Count
fnafan8888888888 M
Topic author, Count
Count
Age: 18
Reputation: 23
Posts: 206
Joined: 30 Jun 2019

Post #1by fnafan8888888888 » 21 Dec 2019, 1:28

I know there is already a topic:https://wohlsoft.ru/forum/viewtopic.php?f=81&t=2739, but the script in it has 2 problems:
1-The Dry Bones doesn't take effect on gravity.
2-You can't chose between the one that throws bones and the one that doesn't.
I need a script that allows me to chose between the Dry Bones that throws bones and the one that doesn't and the throwing frames would be the last 2 frames just like the one at the topic link above.

FyreNova
Nice citizen
Nice citizen
Avatar
FyreNova
Nice citizen
Nice citizen
Reputation: 2
Posts: 10
Joined: 27 Oct 2019

Post #2by FyreNova » 27 Jan 2020, 7:34

take the dry bones from above, and edit the picture so that the dry bones will have it's exact copy next to it (gfx expansion)
then, replace the existing code with this:

Code: Select all

with npc(sysval(param1))
if .extx = 1
if .xsp = 0 and .facing = 1 then
.curframe = 9
end if
if .xsp = 0 and .facing = 0 then
.curframe = 8
end if
if .nomove = 0 then
.xsp = 1 + (-2*.facing)
end if
.ivala = .ivala + 1
if .ivala > 120 then
.xsp = 0
end if
if .ivala >= 140 then
Call NCreate(133,.X+16,.Y+16,4+(-8*.facing),0,0,0)
.ivala = 0
end if
end if
.ysp = .ysp - 0.14
end with

this should fix the problems you outlined. no credit needed

fnafan8888888888 M
Topic author, Count
Count
fnafan8888888888 M
Topic author, Count
Count
Age: 18
Reputation: 23
Posts: 206
Joined: 30 Jun 2019

Post #3by fnafan8888888888 » 27 Jan 2020, 20:50

FyreNova wrote:take the dry bones from above, and edit the picture so that the dry bones will have it's exact copy next to it (gfx expansion)
then, replace the existing code with this:

Code: Select all

with npc(sysval(param1))
if .extx = 1
if .xsp = 0 and .facing = 1 then
.curframe = 9
end if
if .xsp = 0 and .facing = 0 then
.curframe = 8
end if
if .nomove = 0 then
.xsp = 1 + (-2*.facing)
end if
.ivala = .ivala + 1
if .ivala > 120 then
.xsp = 0
end if
if .ivala >= 140 then
Call NCreate(133,.X+16,.Y+16,4+(-8*.facing),0,0,0)
.ivala = 0
end if
end if
.ysp = .ysp - 0.14
end with

this should fix the problems you outlined. no credit needed
Thanks, but should I enable "ParallelExecution"? because when I test it the npc goes to the top direction instead of going to the bottom direction(reverse gravity) and the first one in gfx expansion doesn't move.

FyreNova
Nice citizen
Nice citizen
Avatar
FyreNova
Nice citizen
Nice citizen
Reputation: 2
Posts: 10
Joined: 27 Oct 2019

Post #4by FyreNova » 27 Jan 2020, 23:55

fnafan8888888888 wrote:
FyreNova wrote:take the dry bones from above, and edit the picture so that the dry bones will have it's exact copy next to it (gfx expansion)
then, replace the existing code with this:

Code: Select all

with npc(sysval(param1))
if .extx = 1
if .xsp = 0 and .facing = 1 then
.curframe = 9
end if
if .xsp = 0 and .facing = 0 then
.curframe = 8
end if
if .nomove = 0 then
.xsp = 1 + (-2*.facing)
end if
.ivala = .ivala + 1
if .ivala > 120 then
.xsp = 0
end if
if .ivala >= 140 then
Call NCreate(133,.X+16,.Y+16,4+(-8*.facing),0,0,0)
.ivala = 0
end if
end if
.ysp = .ysp - 0.14
end with

this should fix the problems you outlined. no credit needed
Thanks, but should I enable "ParallelExecution"? because when I test it the npc goes to the top direction instead of going to the bottom direction(reverse gravity) and the first one in gfx expansion doesn't move.

yeah, sorry. fixed:

Code: Select all

with npc(sysval(param1))
    .ysp = .ysp + 0.14
    if .extx = 1
        if .xsp = 0 then
            .curframe = 8 + .facing
        end if
        .ivala = .ivala + 1
        if .ivala > 120 then
            .xsp = 0
        end if
        if .ivala >= 140 then
            Call NCreate(133,.X+16,.Y+16,4+(-8*.facing),0,0,0)
            .ivala = 0
        end if
    end if
    if .nomove = 0 then
        .xsp = 1 + (-2*.facing)
    end if
end with

(also included a minor optimization)

fnafan8888888888 M
Topic author, Count
Count
fnafan8888888888 M
Topic author, Count
Count
Age: 18
Reputation: 23
Posts: 206
Joined: 30 Jun 2019

Post #5by fnafan8888888888 » 28 Jan 2020, 0:12

FyreNova wrote:
fnafan8888888888 wrote:
FyreNova wrote:take the dry bones from above, and edit the picture so that the dry bones will have it's exact copy next to it (gfx expansion)
then, replace the existing code with this:

Code: Select all

with npc(sysval(param1))
if .extx = 1
if .xsp = 0 and .facing = 1 then
.curframe = 9
end if
if .xsp = 0 and .facing = 0 then
.curframe = 8
end if
if .nomove = 0 then
.xsp = 1 + (-2*.facing)
end if
.ivala = .ivala + 1
if .ivala > 120 then
.xsp = 0
end if
if .ivala >= 140 then
Call NCreate(133,.X+16,.Y+16,4+(-8*.facing),0,0,0)
.ivala = 0
end if
end if
.ysp = .ysp - 0.14
end with

this should fix the problems you outlined. no credit needed
Thanks, but should I enable "ParallelExecution"? because when I test it the npc goes to the top direction instead of going to the bottom direction(reverse gravity) and the first one in gfx expansion doesn't move.

yeah, sorry. fixed:

Code: Select all

with npc(sysval(param1))
 .ysp = .ysp + 0.14
 if .extx = 1
 if .xsp = 0 then
 .curframe = 8 + .facing
 end if
 .ivala = .ivala + 1
 if .ivala > 120 then
 .xsp = 0
 end if
 if .ivala >= 140 then
 Call NCreate(133,.X+16,.Y+16,4+(-8*.facing),0,0,0)
 .ivala = 0
 end if
 end if
 if .nomove = 0 then
 .xsp = 1 + (-2*.facing)
 end if
end with

(also included a minor optimization)
It works, but it doesn't play the last 2 frames in the npc.


Return to “Script requests”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest