Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 Viewsquit making americans look like dick fuck ass holes, i don't want the japanese giving me looks of disgust when i visit their country.
At 2/23/11 10:50 AM, Shadowii2 wrote: Player._x += speed;
As simple as that, granted that positive is right and negative is left. When the speed goes below zero, it tries to do "Player._x + (-speed)" equation, which is the same as "Player._x - speed". Likewise if speed is below zero, and it tries to do "Player._x - (-speed)", it is the same as "Player._x + speed".
Thanks for explaining it, I got it working a while ago but couldn't understand why it did. =)
Here's what i ended up with. The character eases left and right without the annoying slippery effect
speed=0;
maxSpeed=14;
onEnterFrame = function() {
guy._x+=speed;
if(Key.isDown(Key.RIGHT) && !Key.isDown(Key.LEFT)) {
if(speed < maxSpeed) {
if(speed<0){
speed=0;
}else{
speed+=2;
}
}
} else if(Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)) {
if(speed > -maxSpeed) {
if(speed>0){
speed=0;
}else{
speed-=2;
}
}
} else {
speed=0;
}
}
Thanks again guys, now i just need to work the slide/stumble animation in there
At 2/23/11 08:36 AM, Shadowii2 wrote: if(holdingRight && !holdingLeft) {
if(speed < maxSpeed) {
speed++;
}
} else if(holdingLeft && !holdingRight) {
if(speed > -maxSpeed) {
speed--;
}
} else {
if(speed < 0) {
speed++;
} else if (speed > 0) {
speed--;
}
}
Hmm how do i use the variable when it goes into the negatives?
if (going right){
character._x+=speed;
}
if (going left){
character._x-=speed;
}
Thanks for the help though, the variable easing works at least =P
I'm working on a side scroller, and i'm using eased movement, so....
speed=0
maxspeed=14
if (speed<maxspeed){
speed++;
}
Now, speed is set to 0 whenever the arrow keys are either both pressed at the same time, or not pressed at all. The problem i'm having is, there's the instance where you can press left (or right) exactly after letting go of right (or left), wich bypasses both hitting the keys at the same time as well as not pressing either.
is there a way to set speed to 0 whenever you turn around like this?
At 10/19/10 09:13 PM, Fion wrote: You are right about it being because they are using the same iterator 'i', see in this case you test if enemy1 is touching bullet1, if enemy2 is touching bullet2 and so on like that only testing one bullet against one enemy.
Thanks man, i think i got this now =)
So i'm working on a platforming game, and i can't get my bullets to collide with my enemies properly.
Here's what i'm using:
for(i=0;i<99;i++){
if (_root["enemy"+i].hitTest (_root["bullet"+i]._x, _root["bullet"+i]._y, true)){
_root["bullet"+i].removeMovieClip();
}
}
This works fine on the walls, but not enemies. Is it because they're both using the same variable"i"? I tried adding another "for" loop to see if i could give a different variable to the bullets, but the test lagged so bad i couldn't even see if it worked =(
The strange thing is the collision does work once, but only on the enemy at the edge of the map. After that one shot works the rest just go right through, it's driving me crazy!
dang this site is getting serious.
on an unrelated note, dungeon fighter is the best online game evarrr, thanks for advertising it, i never would have checked it out otherwise
At 5/15/10 04:30 PM, physicpebble wrote: Actually one second. If that was the AS for the stop button, what would be the AS for the play?
Sorry if I sound stupid, but I've been trying to find out how to get the play button to work with no luck.
Thanks for the help so far, though.
ah that script is for pausing/ playing with a single button.
pause button:
on(press){
_root.subtitles.stop();
}
play button:
on(press){
_root.subtitles.play();
}
and you won't be needing that substop=true; on the main timeline anymore
At 5/15/10 03:30 PM, physicpebble wrote:
Also wouldn't that mean that whenever the stop button is pushed it would stop it. What would I put for the coding for the play button-and for that matter, where would I place it?
oh woops, i should finish reading peoples posts XD
here's what i would do:
put this in the button
on(press){
if(_root.substop==true){
_root.subtitles.stop();
_root.substop=false;
}
else if(substop==false){
_root.subtitles.play();
_root.substop=true;
}
}
and put this on the main timeline
substop = true;
At 5/15/10 03:30 PM, physicpebble wrote:
actually, you can just add this to your button lol
on(press){
_root.subtitles.stop();
}
can't you just put this in on your subtitles movieclip?
onClipEvent(enterFrame){
if (your show button is pressed)){
this.stop();
}
}
woops, how do you post a code without the forum fking it up? like this?
onClipEvent(load){
active = false;
space = 1;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.SPACE)&&space==1&&active==false){
_alpha = 100;
active = true;
}
if(!Key.isDown(Key.SPACE)&&active==true){
space=2;
}
if(Key.isDown(Key.SPACE)&&space==2&&active==true){
_alpha = 0;
active = false;
}
if(!Key.isDown(Key.SPACE)&&active==false){
space=1;
}
}
i just started programming a couple weeks go, so this is probably the noobiest fix ever:
onClipEvent(load){
active = false;
space = 1;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.SPACE)&&space==1&&acti ve==false){
_alpha = 100;
active = true;
}
if(!Key.isDown(Key.SPACE)&&active==true)
{
space=2;
}
if(Key.isDown(Key.SPACE)&&space==2&&acti ve==true){
_alpha = 0;
active = false;
}
if(!Key.isDown(Key.SPACE)&&active==false ){
space=1;
}
}
damn there goes my plans for the hittests. It'll probably work better if i use invisible mc hittests rather than having a bunch of loops running though
i can't seem to figure out how this should work. What i'm trying to do is create a hittest that's a certain length and not just a single coordinate.
if(this.hitTest(_root.box._x, _root.box._y>0, true)&&this.hitTest(_root.box._x, _root.box._y<50, true)){
this.dosomethingcool("pls");
}
with this script, instead of the guy hitting the coordinates of the box, it's only reacting to the coordiantes of the stage. How do i use greater than and less than for stuff like that?
At 5/5/10 10:53 AM, Neo-13 wrote: Works fine for me. I think the problem may lie in your keyboard, as every keyboard has a limit to how many keys it can detect at once. I can't remember what it's called (for some reason 'ghosting' comes to mind). My keyboard is supposed to be able to deal with 10 at once, and most cheap keyboards I think can usually manage three, so I guess this might not be the problem. I have had issues with the space bar in Flash games I started developing when I first started learning Flash, but never since.
I know it's not a flash issue for me, i have this same problem when playing Rumble Fighter (mmo game) with both of my computers, and one of them is only a year old.
oh well, that's what custom key settings are for i guess =P
So i spent a good 2 days pouring over my script trying to find out why my character wouldn't jump while holding LEFT, SPACE, and pushing UP at the same time. Then i found out the code works perfectly fine if i replace SPACE with any other key, and found out my computer doesn't respond to that key combination, nor does my other laptop wich is also a pc.
-----------
Test this please
http://spamtheweb.com/ul/upload/050510/3 8430_ngtest.php
------------
and let me know if the key combination is letting the character jump or not, I find it strange that both my computers have the same problem.
At 5/2/10 06:24 AM, Doomsday-One wrote: Flash changes most frame labels into numbers when you make the .swf file anyway, so there is often no difference.
Oh good =D Thanks for the reply
I'm making a game and trying to be super careful about any lag issues. So i was wondering, will too many frame labels cause lag?
so instead of gotoAndPlay("comboAAA");
i'd just use gotoAndPlay(4);
The game has 16 combos and overall 46 different attacks i want to put labels on, but not if it will cause lag. Anyone experiment with this before?
I'm using as2
the wind effects are crazy in storm, how did he do that?
huh, so that's what seizure skipping looks like
At 8/22/09 05:18 AM, dirtshake wrote: I love smoking out of a hookah once in a while. It is a calm, relaxing, and social activity that I do with my friends once in a while and it is a blast. It is one of the healthier things to smoke and not addicting if done in moderation (as all things in life should be). I usually go with my girlfriend or a couple of friends to a hookah lounge and we spend a couple hours smoking, eating, and drinking. Very chill and very relaxing.
and that's the way to do it. everyone here freaking out about tobacco is thinking of the chain smokers who do it way too much for the wrong reasons, smoking to me is a social thing that everyone should experience at least once (i recommend the hookah though)
what the heck is this? are you selling art?
did you mean something like this? http://spamtheweb.com/ul/upload/3808/539 07_sword.php
school assignment? are you in 2nd grade?
only a true pirate uses hair ties on his mohawk pubes!
i can't wait to be the envy of all my friends and show up to class wearing my stylish $80 value obama shoes and free ultra cool obama backpack!
i bought them because they were literally running off the shelf
some jerks at iscribble kept ruining my beautiful picture
this is for a taekwondo club right? so the moves will be taekwondo?