|
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
help w/ ACTUAL MOVING Character Control (UP, DOWN, LEFT, RIGHT)
I understand:
Here is a short summary of the game:
Last edited by stillfunny2u; 02-27-2004 at 11:42 AM. |
|
|
|
|
#2 | |
|
Guest
Posts: n/a
|
Quote:
i asume you know what the _x and _y variable does, and what +=5; does. if you want the boat to move when you press a key, just use this:
then just use those for the key and when the wave hits it good luck, and welcome to Flashkit
|
|
|
|
#3 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
Thie is what I have for my actionscript on the boat:
onClipEvent (enterFrame) { //when the user presses 'up', the boat goes up if(Key.isDown(Key.UP)) { if(direction=="up"){ this._y -=36; } else { this._rotation=0 direction = "up"; } } // added _rotation modifier- so it looks like it is going up or down when you press the arrows //when the user presses 'down', the boat goes down if(Key.isDown(Key.DOWN)) { if(direction=="down"){ this._y +=36; } else { this._rotation=180 direction = "down"; } } //when the user presses 'left', the boat goes left if(Key.isDown(Key.LEFT)) { if(direction=="left"){ this._x -=36; } else { this._rotation=270 direction = "left"; } } //when the user presses 'right', the boat goes right if(Key.isDown(Key.RIGHT)) { if(direction=="right"){ this._x +=36; } else { this._rotation=90 direction = "right"; } } } This is pretty much what you have, exept mine has this._x, not _x;. I want the user to be able to tap up, then have the boat, MOVE, up, not just go "dun!" and make it just jump. |
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
that is a frame rate problem you have there. -36 is quite a lot, and i guess you have the standard frame rate of 12. change the frame rate to 30 or 40 and the _x+=5. then it will look smoother.
Edit: aha, tilebased. forget what i said. i think tonypa has some stuff on this. i came up with a way to do it though: |
|
|
#5 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
i mean, maybe on the first frame have a movieclip, then have a tween. then when you press up, it plays the movie moving the movieclip? but how could it move to a different spot each time? I want the mc to move to _x+36, not just in an instant be there.
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
here is the upload:
|
|
|
#7 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
THANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTH ANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHAN KYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKY OUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOU THANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOU
|
|
|
|
|
#8 |
|
Guest
Posts: n/a
|
ANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEA NYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEAN YTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANY TIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYT IMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTI MEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIMEANYTIM EANYTIMEANYTIMEANYTIME
just not tomorrow...
|
|
|
#9 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
just one tiny little problem, how do i know whats going on so that I can edit it, like if I wanted to make more waves?
|
|
|
|
|
#10 |
|
Guest
Posts: n/a
|
what is it you dont understand? just so its easier to explain (it wasnt meant to be rude
)
|
|
|
#11 | |
|
Senior Member
Join Date: Jan 2004
Posts: 366
|
Quote:
And I cant really say how to add more waves without actually knowing how you make waves in first place. You only posted the movement code. |
|
|
|
|
|
#12 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
These are my questions:[list=1][*]What does the "s" variable do?[*]How did you change it to "xs" and "ys"?[*]What does the "pos" variable mean?[*]If I wanted to add more "waves", how would I do so? (I guess I probably could figure that one out myself, if I understood how it all worked)[/list=1]
Just for some background info, this is going to be used for a puzzle in a game I am making. The game is a rpg/puzzle game inspired by Myst, Mystery of Time and Space (MOTAS), and The Curse of Monkey Island. When I finish the entire game(which at the rate I'm going, will be when I'm 60), I will post it in the forums. One more thing, if you don't want to answer this you don't have to: What kind of position are you in that you can just be on your computer all day long, answering requests like mine? (believe me, I would die for that life )Oh yeah, one more "one more thing", Thanks again, for all that you have done to help me!!
|
|
|
|
|
#13 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
HeyArrowFlash, copied and pasted that, but I did not use the "click and drag" method to write it, it just takes too long.
Last edited by stillfunny2u; 02-28-2004 at 09:13 PM. |
|
|
|
|
#14 |
|
Senior Member
Join Date: Jan 2004
Posts: 366
|
excuse me I didnt see it was attached. do0tn be a jack***.
|
|
|
|
|
#15 |
|
Moderator
Join Date: Jul 2001
Location: Estonia
Posts: 8,138
|
Hey, hey, no need to be rude
![]() You can always use "edit" button if you have made mistake in your post. Or delete the post altogether. |
|
|
|
|
#16 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
In these forums you cant tell when somebody is joking! Hey I'm sorry {COLOR=blue]Arrowflash[/color].
.
Last edited by stillfunny2u; 02-28-2004 at 09:15 PM. |
|
|
|
|
#17 |
|
Guest
Posts: n/a
|
calm down guys, no name calling here
1) the s variable is the speed you want the boat to move at. thei higher it is, the faster the boat moves, but the more it "jumps" 2) it wasnt hard chanign it to xs and ys ![]() 3) pos is just for checking if the boat has traveled far enough. there are 36 pixels between one tile and the next, so when pos==36, it is at the next tile and the moving should be stopped. 4) good question. i would sugest using a 2d array and learning tilebased game making. hunt down tonypa for that |
|
|
#18 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
you've answered all of my questions, but what I meant by #2 was, what does xs and yx mean?
|
|
|
|
|
#19 |
|
Guest
Posts: n/a
|
xs and ys is the speed and the direction controler. if xs is positive, it will move to the right and if it isnt, it will move to the left. if ys is positive, it wil move down, and if it isnt, it will move up.
|
|
|
#20 |
|
GoldMember
Join Date: Feb 2004
Location: Chicago
Posts: 78
|
for the last time thank you,
Last edited by stillfunny2u; 02-28-2004 at 09:17 PM. |
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|