Page 1 of 1

how do i make tux run?

PostPosted: 16 Feb 2018, 10:47
by sinisa3games
how do i make tux run? (with a script)

Re: how do i make tux run?

PostPosted: 16 Feb 2018, 10:58
by manuel
I never did that, but here's what I would try following to the Scripting Reference (http://supertux.lethargik.org/wiki/ScriptingPlayer).

Tux.walk(speed) Maybe add a high speed to him.
Tux.do_scripting_controller("left",true) This should make Tux react like the "left"-key was pressed (You can use "right" if he should run in the other direction). But I don't know if this is only a short action and Tux will only make one step.

Re: how do i make tux run?

PostPosted: 16 Feb 2018, 11:03
by sinisa3games
i just needed to do tux.walk(high speed), anyways thank you

Re: how do i make tux run?

PostPosted: 16 Feb 2018, 11:34
by manuel
Ok, nice to hear. Then I've learned something, too :)

Re: how do i make tux run?

PostPosted: 16 Feb 2018, 12:03
by mteufel
{l Code}: {l Select All Code}
Tux.do_scripting_controller("left",true);

Would not work anyway. You first need to hand over control of key input to the script:
{l Code}: {l Select All Code}
Tux.use_scripting_controller(true);

When this is done, the player's keyboard input is disabled however (until you execute the same function but with false).

Re: how do i make tux run?

PostPosted: 06 Jul 2018, 17:28
by theXman63
he allready runs automaticlyfile:///C:/Users/dlmcg/Pictures/tamagotchi%20remaster/tux-dab.png