Computer Science Canada Placing pictures one after another (RPG Character) |
Author: | strike_hawk89 [ Tue May 10, 2005 8:30 pm ] | ||
Post subject: | Placing pictures one after another (RPG Character) | ||
i cannot get two pics to repeat one after the other. I tried alot of stuff too. I want it so that it shows two steps: character's left foot sticking out, and then characters right foot sticking out, and it keeps on repeating until the user lets go of the movement key (eg KEY_DOWN, etc.) Everytime i have tried the character walks very slow or doesnt show the two pics smoothly when walking across the screen.
plz help |
Author: | AsianSensation [ Tue May 10, 2005 8:41 pm ] |
Post subject: | |
This is a question best answered with View.Update. Assuming you have one of the newer version of turing, which would be 4.0.1 or above I believe, then you can use View.Update to fix your flickering and speed problems. There should also be a tutorial in our tutorial section, detailing how to use View.Update. |
Author: | strike_hawk89 [ Tue May 10, 2005 9:08 pm ] |
Post subject: | |
ya that works a bit but not really good... and i want to have another pic so that first it has left leg sticking out and then, like after half a second, the pic changes so that the right leg is sticking out, and it repeats over and over until the user lets go of the button. so i would insert pic2 := Pic.FileNew ("up2.bmp") inside the if statements? (PS. tried that several times but didnt work) |
Author: | c0bra54 [ Tue May 10, 2005 10:34 pm ] |
Post subject: | |
blah i seem to be missing the del button on this post.. quick hacker dan.. kill meeeee |
Author: | c0bra54 [ Tue May 10, 2005 10:39 pm ] |
Post subject: | |
ummm strike, what you are wanting is more of an animation loop.. and i believe that the easiest way to do this is using an array for each direction if u don't know what an array is by chance, then check out the tutorial section, i am sure hacker D has a good one in htere somewhere yeh for make a array to store each pic ofr up down left and right var down :array 1..2 of int var up :array 1..2 of int and then use for loops to do the file new commands again check forums if not sure on some of this stuff for i :1..2 down(i) :+ Pic.FileNew ("down" + intstr(i) +".JPG") up(i) :+ Pic.FileNew ("up" + intstr(i) +".JPG") end loop nwo that you have the picture files loaded you can use a count to swithc them on and off var countup :int :=1 var countdown:int :=1 note some of this is written in pseudocode and algorithm loop if keypress check returns up arrow then if countup =2 then countup :=1 else countup:=2 end if Pic.Draw (up(countup),x,y,picMerge) elsif keypress returns down arrow then if countdown =2 then countdown :=1 else countdown:=2 end if Pic.Draw(down(countdown),x,y,picMerge) end if end loop this will make your animation still flash, since you need to sue offscreenonly but this will work for you as of right now.. just substitue in your code, or something and it should work fine.. this is i guess the smarter way of doing it, since you cut down alot of var statements. enjoy end loop |
Author: | MysticVegeta [ Wed May 11, 2005 6:20 am ] |
Post subject: | |
There is a tutorial in the Tutorial section that describes how you can import .gif files into turing. .gif is an animation file and can be made usng photoshop, paintshop, etc |
Author: | c0bra54 [ Wed May 11, 2005 7:29 am ] |
Post subject: | |
umm turing does not actually import gif's.. it can't use them, you simply use photoshop or anyn other gif spliter, and seperate the gif into jpg's/bmp's... so yeh, you can't use true animated gif's in turing since they were dumb and never got the licensing for it... |