Vector Grafix Animation Studios

REVOLUTIONISING THE PRESENT....

Blog

view:  full / summary

Action script for char movements(platformer)

Posted by CRYBORG on May 10, 2014 at 8:00 PM Comments comments (0)

HERE'S A LITTLE HELP FOR THE FLASH DEVOLOPERS!!

YOU CAN GET FREE ACTION SCRIPTS OR CODES FROM OUR SITE 

HERE ARE THE CODES FOR ONE THE MOST POPULAR GAME GENRE,PLATFORMER(ONLY FOR THE "CHAR")

onClipEvent (load) {

var ground:MovieClip = _root.ground;

var grav:Number = 0;

var gravity:Number = 2;

var maxspeed:Number = 10;

var xspeed:Number = 0;

var acceleration:Number = 2;

var maxJump:Number = -15;

var friction:Number = 0.9;

var yspeed:Number = 0;

var bounce:Number = -0.9;

var touchingGround:Boolean = false;

}

onClipEvent (enterFrame) {

xspeed *= friction;

if (Math.abs(speed) < 0.3) {

xspeed = 0;

}

_y += grav;

grav += gravity;

while (ground.hitTest(_x, _y, true)) {

_y -= gravity;

grav = 0;

}

if (ground.hitTest(_x, _y+5, true)) {

touchingGround = true;

} else {

touchingGround = false;

}

if (Key.isDown(Key.RIGHT)) {

if ( xspeed < maxspeed ) {

xspeed += acceleration;

 

}

}

if (Key.isDown(Key.LEFT)) {

if ( Math.abs(xspeed) < maxspeed ) {

xspeed -= acceleration;

}

}

if (Key.isDown(Key.UP) && touchingGround) {

grav = maxJump;

}

if (ground.hitTest(_x+(_width/2), _y-(_height/2), true)) {

acceleration = -2;

xspeed = 0;

xspeed += acceleration;

_x += xspeed ;

}else{

acceleration = 2;

}

if (ground.hitTest(_x-(_width/2), _y-(_height/2), true)) {

acceleration = -2;

xspeed = 0;

xspeed -= acceleration;

_x += xspeed ;

}else{

acceleration = 2;

}

if (ground.hitTest(_x-(_width/2), _y-(_height/2), true)) {

_x += xspeed;

}

if (ground.hitTest(_x, _y-(height), true)) {

grav = 3;

}

_x += xspeed;

}

If you recieve any errors, inform us because all the codes are tested before publishing 

NOTE : YOU CAN ALSO GET ACTION SCRIPT OR THE CODES ON DEMAND,ALL YOU NEED TO DO IS TO SIGN UP AT OUR SITE AND PLACE AN ORDER UNDER "DOWNLOAD OR ORDER SECTION"

Action script for restart box (platform)

Posted by CRYBORG on May 9, 2014 at 5:45 AM Comments comments (0)

onClipEvent (enterFrame) {

if (_root.char.hitTest(this)) {

_root.char._x = charX = (your your custom coordinate)

_root.char._y = charY =(your your custom coordinate)

}

}

 

the outsiders

Posted by CRYBORG on April 24, 2014 at 3:45 PM Comments comments (0)

i've been writting my story......now you can read i too

CHAPTER - 1

It was quite late at night...dark , me and my friend had decided a night out together.We thought that we would spend time in the forest ,which is just at the walking distance from our house. Yes, I live in a hill station, a small hill station which is not even known in our own state. But still I like the place where I live. It was a clear “no”, that is what we had prepared ourselves for but thing was this. My mom specified “not that forest at all”. I, without wasting any more second , replied “what about the forest which is at the other corner of the outskirts of the residential area. They were both ready for this but than another problem come ,“it’s too far from here and what if we want to contact you..or what if any storm comes at night …’NO’”. Again “no”,we both didn’t knew what to do…..so atlast I got an idea what if just set up our tents in the lawn.”are you crazy,if any one sees us ,do you have any idea how fun they are going to make of us” my friend replied…actually he was shouting at me..

I’m Anirudh, yes, from India.And my friends good name is Jatin.He’s just like my brother.After having a exact fifteen minute fight over that lawn camping, we both agreed on that we will set up our tents in the back of our house, after all whose going to be there at night behind our house and the best part there’s a quite a good amount of space behind our house.We set up everything including the tents,the scopes,every thing.”Well it not a bad idea at all” jatin said.”I’m good, I know “.ani..ani" ……………my mom called out

To be continued in chapter 2

Stay tuned O_<


Rss_feed