1. How do you make Koopa Paratroopas fly in circles?
2. How do you make an enemy chase the player BUT turn around 1 second after the player goes in the opposite direction?
3. Is it possible to make a script so that Koopa Paratroopas only jump over Koopa shells (i.e. The yellow Koopa Paratroopa from SMW)
4. So the way this script works is that the Koopa Paratroopas have different behaviors depending on their ExtX. Here is what I got so far:
Code: Select all
with npc(sysval(param1))
if .extx=1 then 'Jumps
.ysp=.ysp+0.26
if .ysp>8 then
.ysp=8
end if
.ivala=.ivala+1
if .ivala=1 then
.xsp=1.2*(1-2*.facing)
if .name="" then
.ivalb=4
else
.ivalb=cdbl(.name)
end if
end if
if .ysp=0.26 and .ivala>1 then
.ysp=-sqr(0.52*32*.ivalb)
end if
end if
If .extx=2 then 'Flies forward without stopping or turning around
.ivalb = .ivalb + 1
If .ivala = 0 Then
.Ysp = .Ysp - 0.06
Elseif .ivala = 1 Then
.Ysp = .Ysp + 0.06
End if
If .Ysp => 1 Then
.ivala = 0
Elseif .Ysp =< -1 Then
.ivala = 1
End if
If .facing = 0 and .ivalc = 0 Then
.Xsp = 1
Elseif .facing = 1 and .ivalc = 0 Then
.Xsp = -1
End if
end if
if .extx=3 then 'Flies in place with little vertical movement
.ivalb = .ivalb + 1
If .ivala = 0 Then
.Ysp = .Ysp - 0.06
Elseif .ivala = 1 Then
.Ysp = .Ysp + 0.06
End if
If .Ysp => 1 Then
.ivala = 0
Elseif .Ysp =< -1 Then
.ivala = 1
End if
end if
if .extx=4 then 'Flies up and down 7 tiles
.ivalb = .ivalb + 1
If .ivala = 0 Then
.Ysp = .Ysp - 0.018
Elseif .ivala = 1 Then
.Ysp = .Ysp + 0.018
End if
If .Ysp => 2 Then
.ivala = 0
Elseif .Ysp =< -2 Then
.ivala = 1
End if
If char(1).X > .X then
.facing=0
elseif char(1).X < .X then
.facing=1
end if
end if
end with
Now for .extx=0, I want the Koopa Paratroopas to use their regular default behavior. Is that possible?
Also not all of the script is entirely mine. Of course I will credit the people who helped make a portion of this script. Also I am not very good at scripting, so most of this is greatly modifying other people's scripts.