Can you change the framespeed of an NPC via scripts?

Description: Internal scripting system of SMBX-38A Engine based on the simple VB-like language
Moderators: Lx Xzit, Yoshi021, 5438A38A, Semi-moderatos, Moderators

1gnacio25 M
Topic author, Good citizen
Good citizen
1gnacio25 M
Topic author, Good citizen
Good citizen
Age: 15
Reputation: 24
Posts: 31
Joined: 15 Mar 2021

Post #1by 1gnacio25 » 23 Jul 2021, 6:34

The title says it all
Image

coolXD
Honourable citizen
Honourable citizen
coolXD
Honourable citizen
Honourable citizen
Reputation: 32
Posts: 43
Joined: 13 Jan 2020

Post #2by coolXD » 27 Jul 2021, 15:20

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


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest