how do i make tux run?

how do i make tux run?

Postby sinisa3games » 16 Feb 2018, 10:47

how do i make tux run? (with a script)
'Ello
User avatar
sinisa3games
 
Posts: 116
Joined: 08 Feb 2018, 20:45
Location: Right over there

Re: how do i make tux run?

Postby manuel » 16 Feb 2018, 10:58

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.
manuel
 
Posts: 188
Joined: 19 Sep 2017, 09:03

Re: how do i make tux run?

Postby sinisa3games » 16 Feb 2018, 11:03

i just needed to do tux.walk(high speed), anyways thank you
'Ello
User avatar
sinisa3games
 
Posts: 116
Joined: 08 Feb 2018, 20:45
Location: Right over there

Re: how do i make tux run?

Postby manuel » 16 Feb 2018, 11:34

Ok, nice to hear. Then I've learned something, too :)
manuel
 
Posts: 188
Joined: 19 Sep 2017, 09:03

Re: how do i make tux run?

Postby mteufel » 16 Feb 2018, 12:03

{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).
SuperTux developer
mteufel
 
Posts: 139
Joined: 03 Jan 2016, 09:27

Re: how do i make tux run?

Postby theXman63 » 06 Jul 2018, 17:28

he already runs automatically.
Attachments
tux-dab.png
also, this could be a good idle animation.
tux-dab.png (18.6 KiB) Viewed 384 times
Last edited by theXman63 on 21 Jul 2019, 06:17, edited 1 time in total.
User avatar
theXman63
 
Posts: 41
Joined: 15 Jun 2018, 02:26

Re: how do i make tux run?

Postby Alzter » 14 Jan 2019, 04:38

You have to upload files for us to see them. Putting a link to the local file address only works for your computer.
Works on SuperTux art from time to time.
User avatar
Alzter
 
Posts: 300
Joined: 01 Apr 2016, 10:18

Re: how do i make tux run?

Postby theXman63 » 16 Nov 2019, 20:33

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.
User avatar
theXman63
 
Posts: 41
Joined: 15 Jun 2018, 02:26

Re: how do i make tux run?

Postby WeLuvGoatz » 19 Nov 2019, 22:33

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...
Disclaimer: I don't actually love goats (that much, mind). :P
User avatar
WeLuvGoatz
 
Posts: 217
Joined: 23 May 2018, 19:15

Who is online

Users browsing this forum: No registered users and 0 guests