[Yr11 Information Technology] gamemaker code

Bill Kerr billkerr at gmail.com
Thu Aug 30 17:17:27 EST 2007


http://www.users.on.net/~billkerr/g/d6.htm#mathsFacts

runs on the old GM6, if you have that

if not put this code on a controllers create event:
x=round(random(100));
y=round(random(100));
correct = x+y;

answer=get_integer('Add '+string(x) + ' and ' +string(y),'');
// get_integer(str,def)
// pops up a dialogue box and returns the integer entered

if (answer==correct)
    show_message('Well done');
else {
    show_message('try again');
    answer=get_integer('Add '+string(x) + ' and ' +string(y),'');
    if (answer==correct)
        show_message('Well done');
    }


TIMER
Information about object: objTimer

Sprite: <no sprite>
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent: <no parent>
Mask: <same as sprite>

Create Event:
set variable mytime to 0
set Alarm 0 to 30

Alarm Event for alarm 0:
set variable mytime relative to 1
set Alarm 0 to 30

Draw Event:
at position (0,0) draw text: 'time =  '+string(mytime)

hth,
-- 
Bill Kerr
http://billkerr2.blogspot.com/
http://www.users.on.net/~billkerr/
skype: billkerr2006



On 8/30/07, Leverett, Michael M <leverett.michael.m at edumail.vic.gov.au>
wrote:
>
>  Greetings
> I'm looking for the easiest way to have students enter 2 numbers in
> gamemaker, have the program multiply them and then show the answer. We, the
> class and I,  thought we had it but have been unsuccesful. Any help would be
> appreciated.
> Also looking for the script for a timer.
> regards
> michael leverett
>
>
> *Important - *This email and any attachments may be confidential. If
> received in error, please contact us and delete all copies. Before opening
> or using attachments check them for viruses and defects. Regardless of any
> loss, damage or consequence, whether caused by the negligence of the sender
> or not, resulting directly or indirectly from the use of any attached files
> our liability is limited to resupplying any affected attachments. Any
> representations or opinions expressed are those of the individual sender,
> and not necessarily those of the Department of Education and Early Childhood
> Development.
> _______________________________________________
>  http://www.edulists.com.au - FAQ, resources, subscribe, unsubscribe
> Year 11 IT Mailing List kindly supported by
>  http://www.vcaa.vic.edu.au/vce/studies/infotech/infotechindex.html
> <http://www.vcaa.vic.edu.au/vce/studies/infotech/infotechindex.html+> -
> Victorian Curriculum and Assessment Authority and
>  http://www.vitta.org.au - VITTA Victorian Information Technology Teachers
> Association Inc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/yr11it/attachments/20070830/3cbe5d86/attachment.html


More information about the yr11it mailing list