Bouncing npc script?

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

SuperMarioLevels134
Topic author, Nice citizen
Nice citizen
Avatar
SuperMarioLevels134
Topic author, Nice citizen
Nice citizen
Reputation: 0
Posts: 12
Joined: 25 May 2016

Post #1by SuperMarioLevels134 » 9 Aug 2016, 16:17

How would you make a npc/effect bounce? (Stuff like hammers, turnips, bullets, etc)

Beeing Boo
Citizen
Citizen
Beeing Boo
Citizen
Citizen
Reputation: 0
Posts: 7
Joined: 9 Mar 2017

Post #2by Beeing Boo » 23 Mar 2017, 14:19

Maybe you should copy the code from All Koopalings (Lx Xzit) in the Lemmy part.

HugoMDM
Our friend
Our friend
Avatar
HugoMDM
Our friend
Our friend
Reputation: 48
Posts: 64
Joined: 17 Apr 2016

Post #3by HugoMDM » 10 Sep 2017, 8:39

You can give me a example?
Visit my YouTube Channel: HugoMDM

Image

Lx Xzit M
Moderator
Moderator
Avatar
Lx Xzit M
Moderator
Moderator
Reputation: 272
Posts: 619
Joined: 9 Nov 2015
Website

Post #4by Lx Xzit » 10 Sep 2017, 22:16

Here's a basic example:

Code: Select all

with npc(sysval(param1))
.ysp = .ysp + 0.26
if .ysp = 0.26 then
.ysp = -8
end if
end with


With this code you can get a bounce like this:
Spoiler
Image
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest