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

Username:   Password: 
 RegisterRegister   
 loop in a loop
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jedi-bob




PostPosted: Wed Jan 21, 2004 10:12 am   Post subject: loop in a loop

i made a game and its all in a loop and i want to make another loop inside of it for my enemy animation, is a loop in a loop possible??
Sponsor
Sponsor
Sponsor
sponsor
Camo




PostPosted: Wed Jan 21, 2004 10:17 am   Post subject: LOOPY

a loop in a loop is possible and its simple......
u out the loop. in the loop
8)
Camo




PostPosted: Wed Jan 21, 2004 10:17 am   Post subject: LOOPY TYPO

ahah my bad TYPO u put the loop in the loop its that simple!!! 8)
jedi-bob




PostPosted: Wed Jan 21, 2004 10:23 am   Post subject: (No subject)

oh, thanks, now i feel stupid.

oh, and another stupid question, how can i animate my enemy without it affecting the animation of my main character? (how do i animate??)
Andy




PostPosted: Wed Jan 21, 2004 10:26 am   Post subject: (No subject)

read up on View.Update and stop posting stupid questions
Camo




PostPosted: Wed Jan 21, 2004 10:33 am   Post subject: yeah were both newbs its cool

yeah man its always good to check up on the turnig help before u ask the questions when u use view update ur gunna need to adjust ur set screen to something like View.Set (graphics,offscreen only)
jedi-bob




PostPosted: Wed Jan 21, 2004 10:38 am   Post subject: (No subject)

where would i read up on this??
Camo




PostPosted: Wed Jan 21, 2004 2:38 pm   Post subject: dude THINK

u find it in the turning refrences
its in the help area of turning
Confused
shorthair




PostPosted: Wed Jan 21, 2004 4:15 pm   Post subject: (No subject)

Press f10 when using turing , to bring up the help , the 4.0.5 even has buttons to launch examples ( you need to fix most before htey work) and you can also highliht a word and f9 it
ReN3g@de




PostPosted: Sun Jan 25, 2004 10:49 pm   Post subject: (No subject)

also read up on processes and how to "fork" them this will help in animating ur enemy person without affecting the rest of the program.
AsianSensation




PostPosted: Mon Jan 26, 2004 11:32 am   Post subject: (No subject)

ReN3g@de wrote:
also read up on processes and how to "fork" them this will help in animating ur enemy person without affecting the rest of the program.


grr....forking should kept down to a minimum. To animate, use View.Update with well structured code, and it would be alot simpler. Forking is not all that great and accurate for animations or stuff that needs calculation. Trust me, using fork will have your little animated characters out of sync.
Cervantes




PostPosted: Mon Jan 26, 2004 7:05 pm   Post subject: (No subject)

hhmmm.. if forking isn't good for animations, what is it good for??
scryed




PostPosted: Mon Jan 26, 2004 7:10 pm   Post subject: (No subject)

Background stuff. Playing Music. AI that plots your destruction during your turn. Saving to file. hardware polling.
AsianSensation




PostPosted: Mon Jan 26, 2004 7:23 pm   Post subject: (No subject)

scryed wrote:
Background stuff. Playing Music. AI that plots your destruction during your turn. Saving to file. hardware polling.


I agree with the music, that's the only easy way(if not the only way) turing has if you want to play some sound. the enemy AI doesn't need fork, all you need is have it does it's calculation during your turn and his turn. So in the procedure that allows the user to input, have it call the AI procedure too. Saving to file? I don't know why fork is used for that. And hardware polling? no idea what that is.
DanShadow




PostPosted: Mon Jan 26, 2004 9:11 pm   Post subject: (No subject)

loop in a loop is easy..lol.
code:

loop
%Random variable settings or something
loop
%Main Program
exit when condition_fufilled=true
end loop
end loop

And as for animations, use for statements and delays.
code:

for i:1..length_of_picture_frames
if i=1 then
Pic.Draw(fighter1,x,y,picMerge)
end if
delay(100)
end for
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  [ 15 Posts ]
Jump to:   


Style:  
Search: