Computer Science Canada Lots and lots of errors... |
Author: | Flikerator [ Thu Feb 10, 2005 6:22 pm ] | ||
Post subject: | Lots and lots of errors... | ||
Okay ima make a list of errors that I have. (NOTE you will have to download the picture)
First of all Ill tell you what I want it to do. Have the little cicle move around (Later resemble a person) and have him face any direction that the mouse is pointing. I got the circle to move with Getch. It flickers. The gun faces the way it is supposed to, but it goes where the mouse is, and overlaps the person (I can fix the overlap). If you can help me fix any or all of these it will be greatly appreciated |
Author: | Bacchus [ Thu Feb 10, 2005 7:26 pm ] | ||
Post subject: | |||
|
Author: | Flikerator [ Thu Feb 10, 2005 8:38 pm ] |
Post subject: | |
Sweet. Thanks for all the help. Its so much smoother and it doesn't blink like crazy thanks. Now I just have to make a bunch of different looking guns in turing (Shotgun, semi, auto, sniper) and have them able to rotate towards the mouse ^^ Ill have to work on that tommorow though cause I dun have turing on this comp (Checked it when I still have other comp). Thanks again. (Its for Zombie Mass'Acres) |
Author: | Flikerator [ Fri Feb 11, 2005 4:14 pm ] | ||
Post subject: | New problem | ||
My gun is nearly complete! But before I finish it to fire in any direction I need a little help. I want the bullets to stop flickering, and I want there to be delay between firing. I was thinking that mabey putting in a gun sound that plays out before you can do anything except move. I dunno I need some help to stop the flickering and put some delay between firing. You will probably want to download the background because it symbolizes the ground which I wil have in my game. I could have just erased the bullet with white instead but I have a multicoloured background so its a bit different.
|
Author: | Cervantes [ Fri Feb 11, 2005 4:31 pm ] |
Post subject: | |
Don't use a process. Especially if it means having two or more View.Updates. |
Author: | Flikerator [ Fri Feb 11, 2005 4:32 pm ] | ||
Post subject: | |||
What else can I do? If I put it in the procedure thing I got going on then the bullet goes its path and then I can move again. UPDATED -----------
|
Author: | Cervantes [ Fri Feb 11, 2005 6:12 pm ] |
Post subject: | |
Flikerator wrote: What else can I do? If I put it in the procedure thing I got going on then the bullet goes its path and then I can move again. Make the bullet an object (or emulate an object) and update it based on its own properties. Learning records would be good for this. Check the tutorial section. -Cervantes |
Author: | Flikerator [ Fri Feb 11, 2005 6:49 pm ] | ||
Post subject: | |||
Search which tutorial and what would it fix? UPDATE CODE - Notice that you can move with the numpad including digonal. You can currently shoot in 4 direction with a small degree of give (Ei 10 pixels either direction) You have to click to fire also.
Things I need to work: - Bullets flickering - Delay BETWEEN firing bullets. That more then the flickering. - The line goes all the way to the mouse. I need it to go only say, 10 pixles towards it. |
Author: | Cervantes [ Fri Feb 11, 2005 6:58 pm ] |
Post subject: | |
Flikerator wrote: Search which tutorial Cervantes wrote: Learning records would be good for this. Check the tutorial section. flikerator wrote: and what would it fix? Cervantes wrote: Don't use a process. To elaborate, it will fix the whole needing-to-use-a-process crap. Also, I'm not sure if you WANT to only be able to shoot in four directions, but you could easily make your bullet fire at any angle if you make the bullet an object and don't use processes. |
Author: | Flikerator [ Fri Feb 11, 2005 7:02 pm ] |
Post subject: | |
Alright thanks I just have to find the tutorial then ill test it out. Thanks for the help btw. EDIT - I checked out the tutorial called "records" and I didn't understand it. Could you give me an example different from the one found there. I looked in turing reference and I don't understand it eiteher, well it gets an error so >.< |
Author: | Cervantes [ Fri Feb 11, 2005 7:50 pm ] | ||
Post subject: | |||
Records are very simple. Types must be a little bit more difficult. Let's just deal with records. We don't need types for this. if we declare a variable, bullet, it can only ever have one value. That limits us, because we need information about the bullets x and y position, as well as its x and y velocity. So, to solve this, we make a record.
Now, we have our variable, "bullet", but we can store much more information with it. It's pretty simple. If you don't get it, come on IRC. compsci.ca on afternet. You can always click Hikaru's link for simplicity. ![]() -Cervantes |
Author: | Flikerator [ Fri Feb 11, 2005 8:17 pm ] |
Post subject: | |
Okay that sounds a little better. But how do I give them values and use them to move the bullet? (I added you to msn, if it didnt work then add me at Doubleultranova@hotmail.com ) Thanks for all the help : D Im learning lots! |
Author: | Bacchus [ Sat Feb 12, 2005 12:28 am ] | ||
Post subject: | |||
to give them values you would do something like:
![]() |
Author: | Flikerator [ Sat Feb 12, 2005 3:15 pm ] |
Post subject: | |
Alright now I finnaly understand records BUT If I put that in then it does the animation of the bullet and doesnt let me do anything untill its done. I would have to put it into a process, which eliminates the whole idea behind me making the bullet a record...lolz I also need to put a delay between firing each bullet. Which Im thinking you have to press the mouse down and then when it goes up it fires again? I unno thats why I need help ^^ Thanks for that Bacchus cause now I know how to work records completely (as far as I know.) |
Author: | Bacchus [ Sat Feb 12, 2005 3:56 pm ] | ||
Post subject: | |||
no prob. but still no processes. they suk and r evil try adding something like this in ur game
|
Author: | Cervantes [ Sat Feb 12, 2005 4:18 pm ] | ||
Post subject: | |||
Bacchus, you're missing a bullet.fire := false somewhere inside your loop. ![]() Flikerator, it might be worth your while to check out the Flexible Array Tutorial. It will give you an example of creating a bullet, firing it off at any direction, and limiting the firing with a cooldown. The cooldown down aspect is a simple function:
Hope that helps, -Cervantes |
Author: | Flikerator [ Sat Feb 12, 2005 5:24 pm ] | ||||
Post subject: | |||||
I was reading through it (Learning a lot thanks Cervantes) and I found this;
That is ALMOST exactly what I wanted. Except I want my person to face the way of the mouse is and move with "W A S D". Side step with "A" and "D" and forward/backwards with "W" and "S".
Fire with click (If z = 1 then) Reload with rightclick (if z = 100 then) Now I want to write the code myself so I have to do some more studying but I need help with those phew things. I like my stuff to be my own so I wont steal your code ![]() You guys really are the best! Ive never learned so much in Turing before and my game is really coming a reality : D (This movement/firing thing is my toughest obstacle) Thanks for all the help! |
Author: | Bacchus [ Sat Feb 12, 2005 6:17 pm ] |
Post subject: | |
Cervantes wrote: Bacchus, you're missing a bullet.fire := false somewhere inside your loop. ya i kno it was just an example, u would set the variable to false once it either runs out of the screen or hits the target.. but i didnt want to make everything workable since it was just for him to get the idea of it.. i think i dunno i kinda forgot wat i was talking about half-way thru this message ![]() ![]() |