Search found 5 matches

by coenzyme
Wed Apr 23, 2014 2:59 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: difference between number variables
Replies: 14
Views: 8715

Re: difference between number variables

I am comparing two times

so when the card opens I have the code

On cardOpen
get the seconds
put it into tStart
end cardOpen

I then have a button with the code in that card:

On mouseUp
get the seconds
put it into tClick
Subtract tClick from tStart
End mouseUp

I am trying to find the time ...
by coenzyme
Wed Apr 23, 2014 2:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: difference between number variables
Replies: 14
Views: 8715

difference between number variables

I am trying to find the difference between 2 variables.

Say I have one variable which has a value of 10 and a second variable that has a value of 12.

The code:

Subtract variable1 from variable2

does not work.

I just need variable2 or a third variable to contain the difference. In the above ...
by coenzyme
Thu Apr 17, 2014 9:28 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Advancing cards after a random number of seconds
Replies: 8
Views: 5128

Advancing cards after a random number of seconds

I would like to create a script that when a card opens it will advance to another card after a random integer of seconds in between 1 and 10.

The card script that I have written is as follows:


on openCard
global tWait
put random(10) into tWait
go to card 4 in tWait seconds
end openCard


The ...