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

Username:   Password: 
 RegisterRegister   
 Turing Troubles...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Krabjuice




PostPosted: Tue Dec 16, 2003 7:16 pm   Post subject: Turing Troubles...

Me, and my friend were given ISU's by our teacher to do over the winter holiday, needless to say, we're to lazy to be coding over the break, so we come for help.

Hes trying to create a graveyard scene with a grim reaper, rain, and lightning.

I, on the other hand am working on a battlefield scene with swaying grass, machine gun fire, falling particles (Which I learned how to harness from latter posts in the source code section) and the occasional explosion, with particle effects.

We, need help, preferably with rain effects, the swaying grass and flashing backgrounds to accompany lightning.
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Tue Dec 16, 2003 7:36 pm   Post subject: (No subject)

mazer did an excellent job with some lightning effects, search for it

you could just import pictures for grass swaying (easiest, no work done, perfects for lazy bums like you Very Happy )

and of course, to get rain effect, just melt my snow effect Laughing
Krabjuice




PostPosted: Wed Dec 17, 2003 4:37 pm   Post subject: (No subject)

Okay, how do I get the screen to refresh without clearing everything? I have a string of text that I want to keep refreshing, but by using cls or Text.Cls, it clears the background as well. Also, the background contains a few randomly generated objects, and using a loop+cls combination causes it to keep generating new backgrounds, I want the same background throughout.
Thuged_Out_G




PostPosted: Wed Dec 17, 2003 4:44 pm   Post subject: (No subject)

you must be drawing your background inside the loop then, using Rand.Int are you?

if you take all the random things out of the loop, it will randomly make it once, and it will stay the same, as long as it is not in a loop...when its in a loop, each time you go through the loop, a new background is made
Krabjuice




PostPosted: Wed Dec 17, 2003 4:49 pm   Post subject: (No subject)

Well, thats my next problem, I want the background to change every time the program runs, not on every cycle.

Bah, wait, my background isn't in a loop, but I need to clear my looping text without clearing the background.
Krabjuice




PostPosted: Wed Dec 17, 2003 5:26 pm   Post subject: (No subject)

Woot! I abused the text.locate instruction to fix my troubles.

code:

    setscreen ("graphics:800;600")
loop v:1..maxx
var tim:string
var day:string
    date (day)
    time (tim)
    colourback (black)
    color (white)
    Text.LocateXY (5, 590)
put day, " " ,tim
    delay (1000)
    View.Update
end loop
Thuged_Out_G




PostPosted: Wed Dec 17, 2003 6:32 pm   Post subject: (No subject)

erm...why did you declare your variables in a loop(a none working loop a may add)

instead of "loop v:1..maxx"

use "for v:1..maxint"

and you may want to make it a procedure so you can fork it later on(i think thats what you need to do to have it run with the rest of your program)

code:

proc time_day
for v : 1 .. maxint
    date (day)
    time (tim)
    colourback (black)
    color (white)
    Text.LocateXY (5, 60)
    put day, " ", tim
    View.Update
end for
end time_day
Krabjuice




PostPosted: Wed Dec 17, 2003 8:16 pm   Post subject: (No subject)

Actually Shocked , it works for me perfectly. o.O
Sponsor
Sponsor
Sponsor
sponsor
nomad




PostPosted: Thu Dec 18, 2003 11:22 am   Post subject: (No subject)

AsianSensation wrote:
and of course, to get rain effect, just melt my snow effect Laughing


lol, if only I knew how to do that.....help please?
Thuged_Out_G




PostPosted: Thu Dec 18, 2003 5:52 pm   Post subject: (No subject)

Krabjuice wrote:
Actually Shocked , it works for me perfectly. o.O


how could that work, i copied your code exzactly, and i get errors...'v has not been declared', 'v is not a procedure an hence cannot be called'

i got both of those errors, because of your loop
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  [ 10 Posts ]
Jump to:   


Style:  
Search: