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 ViewsI have ADHD, and I can tell you that it is definitely real. At school, when i'm not medicated, I lose focus easily, I talk ALOT(almost compulsively) in class, and I'm annoying. I'm also one of the 'funny' kids in my class, and my jokes become extremely lacking in humor when i'm not on meds. So yes, it exists. And no, a beating won't help.
Oh boy.
I feel like a retard now.
When I wrote that I need the code in AS3, I actually meant to write, AS2. What I mean is that I need the code in AS2, NOT AS3.
Oops.
Here is my dilemma:
I want to make a box that the character can push around in the platform game i'm making. However, i am experiencing multiple problems with this box:
1. The box's gravity is not working right.
2. I can't find a way to get the character to push the box.
3. I can't find any online tutorials on this.
I need some code in AS3 to achieve this. Here is some other info on what I have so far:
>The box's instance name is 'box' and the character's instance name is 'Char'.
>Char has a speed of 6.
>I am using a hitTest collision detection system.
That is all I have at the moment. Can somebody please help me here? I would really appreciate it.
You might have heard of this scenario before: A character falling through a platform. Sadly, that is the problem I have.
However, my hitTest systems work perfectly, it's just one strange condition. Let me try to explain:
As a lot of action scripters know, hitTests only work if object one(lets call it ground) hits a certain defined point on Object Two(the Player). If that certain point on the Player(let's call it Point A) is hanging off the edge of the ground or platform even a little bit, the player falls through the platform. However, that is not my current problem.
I currently coded in special hitTests so the player couldn't get up on top of a platform by jumping into it from underneath. That part works. But while this new code is active and Point A is hanging off the platform, my character falls through, except this time, the character somehow manages to fall through a platform beneath the one Player just fell through, faling through the bottom platform as if it were water. I have no idea why.
That is the best description I can give of the problem(sorry if it's not that clear). To make it easier, I have pasted the code for my character here:
onClipEvent(load) {
var Ground:MovieClip=_root.Ground;
var grav :Number=0;
var gravity :Number=2;
var speed :Number=6;
var maxJump :Number= -18;
var touchingGround:Boolean=false;
}
onClipEvent(enterFrame) {
_y +=grav;
grav +=gravity;
while(Ground.hitTest(_x+11.525, _y, true)) {
_y -= gravity
grav = 0;
}
if(Ground.hitTest(_x+11.525, _y+5, true)) {
touchingGround=true;
}else{
touchingGround=false;
}
if(Key.isDown(Key.RIGHT)) {
_x +=speed;
}
if(Key.isDown(Key.LEFT)) {
_x -=speed;
}
if(Key.isDown(Key.UP)&&touchingGround) {
grav=maxJump;
}
//Now here's the new code. (its all the code beneath this line).
if(Ground.hitTest(_x+(_width/2), _y-(_height/2), true)) {
_x-=speed;
}
if(Ground.hitTest(_x-(_width/2), _y-(_height/2), true)) {
_x+=speed;
}
if(Ground.hitTest(_x,_y-(_height), true)) {
grav=3;
}
}
If anyone has any solution to this dilemma, please respond!
That is a good idea. I hadn't thought of that. However, I want to learn how to make the blood spurt out in Actionscript 2. I know that somewhere there is a line of code that will be able to make this effect.
In the game i'm developing, i'm trying to make a little bit of blood spurt out from the enemy when you hit them. I just need the 'blood' to look like a bunch of dark red blobs that shoot out from them. Anyone know how to do this? 'Cause i'm stuck. Any help at all with this current issue will be greatly appreciated.
Retribution!
Coggglez(however you spell it) has already admitted to stealing the song. He has also admitted to stealing three other songs! THREE! How about that?
Hopefully we will never have to worry about him again.
Cycerin,(did i spell that right? god my spellin skillz suck today) your music rocks. It makes me sad that there are some people who just steal the music of people who make better music than they do. Thank (insert the name of your deity here) that he got caught! You go, Cycerin!