Key bind No repeat

About advanced scenes, and the Thyme scripting language used in Algodoo.

Key bind No repeat

Postby frisk.nl » Mon May 31, 2010 6:25 pm

i'm trying to setup some key bindings

this is what i have sofar
Scene.my.height = 4;
Keys.bind("a",{Scene.my.height = Scene.my.height + 0.05});
Keys.bind("z",{Scene.my.height = Scene.my.height - 0.05});

this i working but its not Continuous Motion.

if i keep A or Z pressed then it wont keep on adding or substracting

pls help
frisk.nl
 
Posts: 3
Joined: Mon May 31, 2010 6:17 pm

Re: Key bind No repeat

Postby electronicboy » Mon May 31, 2010 8:33 pm

just use a circle with a hinge on the edge of it to spin and hit a box with the code you want in the oncollide.

ps. the motor strength will have to be a high value
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: Key bind No repeat

Postby Matten » Mon May 31, 2010 8:36 pm

If you use Algodoo you could better use a laser base.
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
User avatar
Matten
 
Posts: 435
Joined: Mon Apr 05, 2010 2:03 pm
Location: The Netherlands

Re: Key bind No repeat

Postby Kilinich » Mon May 31, 2010 9:40 pm

frisk.nl wrote:i'm trying to setup some key bindings
pls help


Unfortunately, key binding not saving with scene, so you can't share it.
We cursed to use collision or laser triggers...
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: Key bind No repeat

Postby frisk.nl » Tue Jun 01, 2010 7:39 am

can you give me an example or if link a tutorial how to do it
frisk.nl
 
Posts: 3
Joined: Mon May 31, 2010 6:17 pm

Re: Key bind No repeat

Postby Kilinich » Tue Jun 01, 2010 9:20 am

Look under wooden sign

Rating: rated 9.5
Filesize: 3.84 MB
Ratings: 157
download
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 24 guests