Page 1 of 1

Help with starting with wario

Posted: Sat Dec 28, 2019 12:12 pm
by arhi998
So i was wondering if there was a script for starting level with a specific character? Like i wanna make starting with Wario in every level, but i don't wanna use Wario block.

Is there a script for that?

Re: Help with starting with wario

Posted: Sat Dec 28, 2019 1:10 pm
by Archived
Archived

Re: Help with starting with wario

Posted: Sat Dec 28, 2019 1:35 pm
by Emral
Eclipsed wrote:
Sat Dec 28, 2019 1:10 pm
arhi998 wrote:
Sat Dec 28, 2019 12:12 pm
So i was wondering if there was a script for starting level with a specific character? Like i wanna make starting with Wario in every level, but i don't wanna use Wario block.

Is there a script for that?
Use an OnStart function and set Player.character to Wario's id
Capitalisation matters. A lot. What you proposed is invalid.

Code: Select all

function onStart()
	player:transform(CHARACTER_WARIO)
end
"player" small (first player instead of the class), and onStart instead of OnStart.

Re: Help with starting with wario

Posted: Mon Dec 30, 2019 6:02 am
by arhi998
Enjl wrote:
Sat Dec 28, 2019 1:35 pm
Eclipsed wrote:
Sat Dec 28, 2019 1:10 pm
arhi998 wrote:
Sat Dec 28, 2019 12:12 pm
So i was wondering if there was a script for starting level with a specific character? Like i wanna make starting with Wario in every level, but i don't wanna use Wario block.

Is there a script for that?
Use an OnStart function and set Player.character to Wario's id
Capitalisation matters. A lot. What you proposed is invalid.

Code: Select all

function onStart()
	player:transform(CHARACTER_WARIO)
end
"player" small (first player instead of the class), and onStart instead of OnStart.
Thanks a lot you two!

You really helped :D