is there's a way to know witch character the player is using?

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

Ariinui
Topic author, Duke
Duke
Ariinui
Topic author, Duke
Duke
Age: 28
Reputation: 21
Posts: 141
Joined: 5 Mar 2017

Post #1by Ariinui » 27 Jun 2017, 19:30

it's for a level that i'm creting: i need to know what character is selected so there'll be a difference if it's mario, luigi, toad, peach or link.

if i'm not as clear as i tought, let me know and i'll explain.

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

Post #2by Lx Xzit » 28 Jun 2017, 1:00

Yes. Use "char(1).ID = X", being X the ID of the player:
0 = Mario
1 = Luigi
2 = Peach
3 = Toad
4 = Link

Example:

Code: Select all

if char(1).ID = 0 then
call showmsg("it's Mario")
end if
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

Ariinui
Topic author, Duke
Duke
Ariinui
Topic author, Duke
Duke
Age: 28
Reputation: 21
Posts: 141
Joined: 5 Mar 2017

Post #3by Ariinui » 28 Jun 2017, 3:36

thanks!


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest