Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 moving a stick figure
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
dirk87




PostPosted: Thu Apr 10, 2008 7:41 am   Post subject: moving a stick figure

Im working on a project in turing for my computer class and i cant figure out how to make my stick person move from the right side of the screen to the middle.
Sponsor
Sponsor
Sponsor
sponsor
petree08




PostPosted: Thu Apr 10, 2008 10:02 am   Post subject: RE:moving a stick figure

are you using draw commads to draw your stickman? if so you can base where the figuguer is being drawn on an x and y variable.

psudeo code

proc Draw_Stickman (X,Y :int)

%% draw stickman
%%example of a draw command based on X,Y

% spine maybe
drawline (X, Y + 10, X, Y- 10, 7)

end Draw_Stickman

end Draw_Stickman

okay so now you need him to move right?

to do this you need to make some sort of change in the X, Y vars

example

var X, Y : int

X := 1
Y := 100

loop
cls
X := X + 1
Draw_Stickman (X,Y)
end loop


this will cause your stickman to go to the right,


If this doesn't help try looking at the tutorial section. There are lots of threads and topics on various animation technics

- happy coding
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: