Is there a way to know if the player is mounting Yoshi?

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

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 402
Posts: 757
Joined: 9 Nov 2015
Website

Post #1by Lx Xzit » 17 Jul 2016, 9:07

I'm making a level that features Yoshi, to be exact, I'd like that a layer toggles when the game detect that the player is mounting Yoshi. I'd like to make something similar to the fan-game "Toadette Strikes": when the player is mounting Yoshi, then some blocks appears, and when the player isn't mounting Yoshi, the blocks will dissapear, I wonder if there's a way to do this through Scripts. Can someone please help me? :>
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

TheCreator520
Close friend
Close friend
Avatar
TheCreator520
Close friend
Close friend
Reputation: 64
Posts: 91
Joined: 21 Feb 2016

Post #2by TheCreator520 » 17 Jul 2016, 9:29

Have you tried char(1).ItemSlot ?
Image

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 402
Posts: 757
Joined: 9 Nov 2015
Website

Post #3by Lx Xzit » 17 Jul 2016, 9:47

Nope, can you please give me an example how it would work with Yoshi?
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

rotom407 M
Nice citizen
Nice citizen
rotom407 M
Nice citizen
Nice citizen
Age: 25
Reputation: 0
Posts: 15
Joined: 28 Jun 2016

Post #4by rotom407 » 17 Jul 2016, 10:02

I did some experiments.
Spoiler
itemslot=
less than -20:Makes the player invisible
-20:Coin Box
-19:Cannon Box
-18:Propeller Box
-17:Spiny Mask
-16:Goomba Mask
-15:Buzzy Beetle Mask
-14:Empty Mask (Placeholder?)
-13:Rocket F.L.U.D.D.
-12:Turbo F.L.U.D.D.
-11:Hover F.L.U.D.D.
-10:Makes the player invisible
-9:Makes the player invisible
-8:Makes the player invisible
-7:Makes the player invisible
-6:Makes the player invisible
-5:Makes the player invisible
-4:Clown Car
-3:Lakitu's Shoe
-2:Podoboo's Shoe
-1:Kuribo's Shoe
0:No mount
1:Green Yoshi
2:Blue Yoshi
3:Yellow Yoshi
4:Red Yoshi
5:Black Yoshi
6:Purple Yoshi
7:Pink Yoshi
8:Ice Yoshi
greater than 8:Crashes the game
So if the player is mounting a yoshi, the variable "itemslot" is always greater than 0.

Yoshi021 M
Moderator
Moderator
Avatar
Yoshi021 M
Moderator
Moderator
Age: 22
Reputation: 170
Posts: 693
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #5by Yoshi021 » 17 Jul 2016, 17:33

I made a quick test level. This script is really cool and gave me an idea with char(1).ItemSlot = -19
Attachments
char(1).ItemSlot.lvl
(14.38 KiB) Downloaded 253 times
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 402
Posts: 757
Joined: 9 Nov 2015
Website

Post #6by Lx Xzit » 17 Jul 2016, 22:39

Thank you everyone for the help!
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