Kaapola
37 posts
|
Topic: Game Programming /
basic problems with movement (AS2) (still unsolved)
Originally posted by tomdeaap:
Your problem is that when the key is down, you keep on setting it to a specific frame, not allowing it to play any further. ( try using an boolean like if (walking == false) {gotoandPlay(…) walking = true}; )
Im well aware of that tom, I noticed it right at start and thats the reason why I put in the walk variable. Its supposed to keep the walking animation being played only every sixth frame. Im sorry not to have updated the code yet, Ill do it now, and as you can see I put in a walk = 0; to reset walk to zero after starting the walk. The problem is walk = 0; doesnt work for some reason, I checked that with the tracers.
(besides Im not sure how to do it the way you suggest)
|
|
|
Kaapola
37 posts
|
Topic: Game Programming /
basic problems with movement (AS2) (still unsolved)
I found part of the problem using tracers, the error was Id put var in front of the variable in the onLoad function. Having that removed, the guy does move but the walking animation still doesnt load. The resetting of the walk variable doesnt work, its stuck at 6. Whats wrong THERE then?
|
|
|
Kaapola
37 posts
|
Topic: Off-topic /
Scariest (Paranormal) thing that has ever happened to you
well this one time I was playing some need for speed game and the CD exploded in the drive… I doubt if thats paranormal but havent heard of anyone else with exploding CDs yet…
|
|
|
Kaapola
37 posts
|
Topic: Off-topic /
Fun with Wikipedia
1. Dan Keily
2. Report (nursing)
3. McGillicuddy Highland Army
|
|
|
Kaapola
37 posts
|
Topic: Off-topic /
How the world will REALLY end!
Originally posted by iamlegend117:
I think everyone should go read the book of Revelation, then come back and continue this discussion.
Religion has been having to retreat and put up with severe and continuous losses in its everlasting combat against logic, reality and science all the time ever since the medieval. Don’t see why that should change in 2012.
|
|
|
Kaapola
37 posts
|
Topic: Collaborations /
not helpful this way
wait a sec thats impossible… if 3 people have rated something then it cant be 3.25, it can only be something with the decimals .00 or .33 or .67
|
|
|
Kaapola
37 posts
|
Topic: Game Programming /
basic problems with movement (AS2) (still unsolved)
ok I fixed the == and theres no error message anymore but it still wont move when I press left and right (I did notice already the code lacked a resetter that resets walk to 0 but I fixed that too already) so how can I fix the walking problem now? (with “wont move” I mean it neither moves nor does it play the walking animation)
(this post is edited)
|
|
|
Kaapola
37 posts
|
Topic: Game Programming /
basic problems with movement (AS2) (still unsolved)
I just started programming my first game after having finally finished character animations, and I have a problem. I first tried to implement character movement, and took it straight from my version of the shootorial, plus the mover is a stickman so I also need a walking animation. I tried to implement that without any example so it might be wrong. The walking animation is frames 412 to 417. Anyway, here’s what Ive done:
class Player extends MovieClip
{
var speed;
var walk;
function onLoad()
{
gotoAndStop (412)
speed = 12;
walk = 6;
}
function onEnterFrame()
{
trace (speed);
trace (walk);
if ( Key.isDown(Key.RIGHT) && walk < 6 )
{
_x = _x + speed;
}
if ( Key.isDown(Key.LEFT) && walk < 6 )
{
_x = _x – speed;
}
ifFrameLoaded (417)
{
gotoAndStop (412);
}
if ( Key.isDown(Key.RIGHT) && walk == 6 )
{
walk = 0;
gotoAndPlay (412);
_x = _x + speed;
}
if ( Key.isDown(Key.LEFT) && walk == 6 )
{
walk = 0;
gotoAndPlay (412);
_x = _x – speed;
}
if(walk < 6)
{
walk +=1;
}
}
}
And it doesnt work. It says
Left side of assignment operator must be variable or property.
on lines 25 and 30, as in at the
if(Key.isDown(Key.RIGHT) && walk = 6)
and its left equivalent (didnt put in jumps yet). I put in the walk variable for getting the walking animation to work as before I did that the animation didnt start running till I released the button.
And the second problem: The character doesnt move, it didnt even before I put in the walk variable.
If anyone can help me with these problems, then thanks in advance.
EDIT: updated the code, now the problem is the walk doesnt reset to zero at walk = 0;
|
|
|
Kaapola
37 posts
|
Topic: Collaborations /
To anyone seriously thinking of making a real game:
Originally posted by virror:
Well, sorry if i mis-phrased myself, but the fact still remain, lots of people who think they have the best idea in the world and can’t contribute themselves.
And by the way, I’m not under 20 : p
my post wasnt directed only to you, and I said MOST of you. And levin ya I know but I was just pointing out that you hadnt put it right
|
|
|
Kaapola
37 posts
|
|
|
|
Kaapola
37 posts
|
Topic: Kongregate Labs /
CHAT ROOMS
Originally posted by coon17:
Is their somebody on kongregate thats name is buzzboy17.
use the search function and see…
|
|
|
Kaapola
37 posts
|
Topic: Collaborations /
To anyone seriously thinking of making a real game:
I dont have much to say here probly cause I havent been in this forum for more than maybe 2 weeks, and Im still working on my first game and suck at art, but in my opinion the word “teenagers” includes everyone under 20, not under 15. The kind of stuff you accuse teenagers of sounds much more like the work of 10-year olds. Besides, considering the lacks of orthography here which are even more severe than in a normal forum discussion, Id say most of you ARE under 20.
|
|
|
Kaapola
37 posts
|
Topic: Kongregate Labs /
Craps Baseball game
well if sean_sanchez insists on making this thread a flash game portal then we of course, being friendly and open members of the community, must simulate an environment as real as possible, as in filling the comments with things like “first”, “stupid game” and “too easy”. To this I contributed with my first post, as we mustnt discourage people who like filling forums with entirely pointless issues.
|
|
|
Kaapola
37 posts
|
Topic: Kongregate Labs /
Craps Baseball game
yes virror thats a well known fact and thats why these kinds of sayings e.g. “this game sucks balls” always represent your own opinion, which again is a fact which should be common knowledge and which you hopefully learned now too. Glad to teach you something new.
|
|
|
Kaapola
37 posts
|
Topic: Kongregate Labs /
Craps Baseball game
This post has been removed by an administrator or moderator
|
|
|
Kaapola
37 posts
|
Topic: Kongregate Labs /
About money
I was just curious cause Ive seen people saying flash games dont make practically any money, others saying they do it for a living, so I wondered what the exact sums are you get from flash games just here on kongregate? As in, Ive got the impression the base of flash game money is a standard sum per view. If this is true, and there is a defined sum, then how much is that? If not, then what is it based on and how much is it? If its said in some faq or similar, then please do send the link to whereever its officially explained. Id just like to know as Im pretty confused about the entire scale the flash money is about.
|
|
|
Kaapola
37 posts
|
Topic: Collaborations /
Looking for Programmer (I will Pay)
Im sure you dont. (it was a joke about your typo)
|
|
|
Kaapola
37 posts
|
Topic: Game Programming /
Need Programming Help
btw isnt the jetpack and throwing the bomb the exact same thing what comes to coding it?
|
|
|
Kaapola
37 posts
|
Topic: Game Programming /
Need Programming Help
actually, I think theres one thing he needs and the shootorials dont explain… gravity. Not sure tho, Ive only went through them once.
|
|
|
Kaapola
37 posts
|
Topic: Collaborations /
Looking for Programmer (I will Pay)
no I dont think its a good idea if people start filling out the FORUM
|
|
|
Kaapola
37 posts
|
Topic: Kongregate Labs /
Mirroring
k I might, after the trial of cs3 runs out (sorry but got used to it already :D)
|
|
|
Kaapola
37 posts
|
Topic: Kongregate Labs /
Mirroring
well Im just using as2 cause the shootorials were using it and I dont want to relearn the basics…
|
|
|
Kaapola
37 posts
|
Topic: Game Programming /
I need a code for my Platform Game
idk if Im just stupid but why dont you just do the keyisdown code with arrowkeys on all objects except the player?
|
|
|
Kaapola
37 posts
|
Topic: Kongregate Labs /
Mirroring
k thanks again
|
|
|
Kaapola
37 posts
|
Topic: Kongregate Labs /
Mirroring
k thanks… and does that command work in as2 or as3? Cause Im using as2
|