The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.36 / 5.00 33,851 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 12,195 ViewsNew Game
I finally finished this game..
So check it out its pretty simple and isnt doing as well in the portal as I had hoped..
At 8/18/08 04:11 PM, mwmike wrote: When he created it his BA was over 3.5
Well im sure using clock day to raise BA is against the rules anyways..
http://www.newgrounds.com/bbs/topic/9105 59
/thread
At 8/17/08 07:56 AM, RocketMan08 wrote: should the boundary be a graphic or movieclip?
Neither unless you are talking about hitTests instead of boundaries..
At 8/17/08 07:45 AM, WhoknowsmeaUdiO wrote: Didn't see my post >:(
P
Not to be a dick but your code has a much bigger chance of glitching..
If the game for some reason lags and the movieclip skips over the exact amount of 550 pixels the code won't work any more thus my code stops that from happening..
Changing
if(this._x==550)
to
if(this._x>550)
will make your code less likely to glitch..
Its just smart programming really..
Here you go for boundaries: (adjust the values based on your stage size)
onClipEvent(enterFrame)
{
if(this._x>550)
{
this._x=550;
}
if(this._x<0)
{
this._x=0;
}
if(this._y<0)
{
this._y=0;
}
if(this._y>400)
{
this._y=400;
}
}
Hope that helps(the values I used were for a default stage adjust them to how you see fit)
I'm sure a job like that is gonna cost a little more near the $500 range.
Nice try though..
Your missing really important parts in a platformer for this collab..
These are more advanced but:
Dynamically created objects
Actionscripted objects
Fine..explanation:
var speed=10;
var gravity=7;
Declares the variables speed and gravity and gives them set amounts.
ball.onEnterFrame=function()
{
Runs the onEnterFrame function on the movieclip"ball" meaning it is the first function called before any other functions and all of the code it contains is constantly repeated.
this._y+=gravity
This code finds the current y value of the movieclip "ball" and the then constantly adds the variable gravity to it..causing the "ball" to fall.
if(this.hitTest(_root.ground))
{
If the movieclip "ball" x or y values hit the movieclip "ground" x or y values then the if statement is deemed true otherwise the if statement is skipped.
gravity=0;
}
Sets the variable gravity to 0 which stops the movieclip "ball" from falling once it hits the ground because this._y+=gravity is just adding 0 to the y value...basically doing nothing.
if(Key.isDown(Key.LEFT))
{
If the user presses down the left arrow key the if statement is deemed true otherwise it is skipped.
this._x-=speed;
}
Constantly subtracts the variable speed to the x value of the movieclip "ball" which causes its x value to go to the left.
if(Key.isDown(Key.RIGHT))
{
If the user presses down the right arrow key the if statement is deemed true otherwise it is skipped.
this._x+=speed;
}
}
Constantly adds the variable speed to the x value of the movieclip "ball" which causes its x value to go to the right.
Hopefully this helps clear it up..
I'm feeling that all that explanation might have been for a lost cause..
At 8/16/08 06:01 PM, Paranoia wrote: That post might have been helpful if you'd explained how the code actually worked >.<
In my opinion that code is pretty self-explanatory..
This is some of the code your asking for..
Give your character the instance name of ball.
Give your ground the instance name of ground.
var speed=10;
var gravity=7;
ball.onEnterFrame=function()
{
this._y+=gravity
if(this.hitTest(_root.ground))
{
gravity=0;
}
if(Key.isDown(Key.LEFT))
{
this._x-=speed;
}
if(Key.isDown(Key.RIGHT))
{
this._x+=speed;
}
}
I hope you know that you just drove a good artist away..
The closest I could get is if the mouse touches a button but you can build on this code.
Make the linkage "button" for this to work.
function buttonfalling()
{
var fall=this.attachMovie("button","button"+a,this.getNextHighestDepth(),{x:Math.random()*550,y:-50});
fall.onEnterFrame=function()
{
this._y+=10;
if(this._y>400)
{
removeMovieClip(this);
}
if(this.hitTest(_xmouse,_ymouse,true))
{
removeMovieClip(this);
score=score+10;
}
}
a++;
}
function onEnterFrame()
{
setInterval("buttonFalling",Math.random()*2000);
}
Hope this helps
Not to be a dick but if you can't do anything as simple as a hittest..even after being told how to do it exactly..
Umm...
ok i'll ask it..
Who are you again?
You can still host a collab at ngcollabs
Well this is sorta related to beer..
So me and a few friends tonight went and got 1/8 of bud then we met up with this drinking party in the park..so an hour later i'm hitting on a decent looking chick and things are going well and we saw this car drive up..
we are at the park and the car is driving on the grass to get to us so we thought cops(were all underaged)
One of friends yells dip so me and friends dip..
now we were all pretty high/drunk so we didnt notice anyone at the party follow us..so after running like a mile we get a call from at the party saying that the car was one of there friends who was driving over more beer to the party..
Thus, I'm now very blown..
Can't this thread just die..
Seriously, who cares..
Ignore my previous statement...
I'll just facepalm myself before anyone else does.
At 8/8/08 12:37 AM, runpoochrun wrote: What's the penalty for shop-lifting where you live? Specifically first-time offenders. In my country I had to go to juvenile hall for a week. I tried to steal a microwave. What I did was bring a big box that said "I am a hobo" on it. I was pretending to be a hobo who lived in that box, and I had put on raggy clothes and wiped mud across my skin, along with some marker coloring (brown and green, mainly) to complete the effect. I would have used the box as a container for the microwave and sneak it out.
That is one of the worst attempts at shoplifting I have ever heard..
Whatever happened to ripping of the barcodes and stuffing it in your pants?
Animating is very open..while some take classes to learn how to draw and such most people(here atleast) don't.
While programming does require patient to an extent..generally programming would take less time then animating an equal amount of work(less time doesn't mean easier).
They are equally difficult..just different.
Coding requires alot of memorization and research.
Animaters need to be unique and patient.
This will help you on specifics other then that I suggest you press F1 in flash and read everything in there.
You need to add your movement code to that code though.
Ugh this isnt that complicated
Put this code in your "player" movieclip.
Give your walls the instance name of "wall".
onClipEvent(load)
{
speed=10;
}
onClipEvent(enterFrame)
{
if(this.hitTest(_root.wall))
{
speed=0;
}
}
So basically just a plug your own work day?
Make sure when you export the flash that the bitrate is set high for better audio quality.