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 already runs automatically.

Re: how do i make tux run?

PostPosted: 14 Jan 2019, 04:38
by Alzter
You have to upload files for us to see them. Putting a link to the local file address only works for your computer.

Re: how do i make tux run?

PostPosted: 16 Nov 2019, 20:33
by theXman63
Alzter {l Wrote}:You have to upload files for us to see them. Putting a link to the local file address only works for your computer.

what? that's impossible.

Re: how do i make tux run?

PostPosted: 19 Nov 2019, 22:33
by WeLuvGoatz
theXman63 {l Wrote}:
Alzter {l Wrote}:You have to upload files for us to see them. Putting a link to the local file address only works for your computer.

what? that's impossible.


uhm...