Page 1 of 1

Can you change the framespeed of an NPC via scripts?

Posted: 23 Jul 2021, 6:34
by 1gnacio25
The title says it all

Posted: 27 Jul 2021, 15:20
by coolXD
Use Change on FrameStyle (2-No Animation)

Take 1

Code: Select all

With npc(Sysval(Param1))
.curtimer += 1
If .curtimer = 17 Then .curtimer = 1
If .curtimer <= 8 Then
   .curframe = 3-2*.facing
Elseif .curtimer <= 16 Then
   .curframe = 4-2*.facing
End if
End with

Take 2

Code: Select all

With npc(Sysval(Param1))
.curtimer += 1
If .curtimer = 17 Then .curtimer = 1
If .curtimer <= 8 Then
   .curframe = 1
Elseif .curtimer <= 16 Then
   .curframe = 2
End if
If .facing = 0 Then .curframe += 2
End with