The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 Viewsid play it, although Im not a huge db fan, the whole thing just confuses the hell out of me alot of the time. but sounds like it could be a fun game, Id like to see a demo.
so I programed a game, all on the first frame and used 2 layers. then after all that was done I inserted frames so the layers both lined up on frame 2. I added _root.gotoAndStop(2) onto my first frame just to jump it to the game as a placeholder for the menu,
the problem is that it tottally screwed up my game, i got missing instances, they dont seem to duplicate anymore and other stuff goes missing. Im not sure what Im doing wrong... if i put everything back onto the first frame it works perfectly again.
what do I need to do to add a menu system in? or what am i doing wrong? anyone had this problem before?
this script is awsome! can you show some more?
heh just make the position of the falling object equal to the top of the object its falling onto.
I cant think of a way to really fix this properly without writeing your own collision detection, since the only way the collision is detected with hittest is when they overlap. so it will always be within the second object before it detects.
i suggest writeing the collision detection yourself, and before moveing it check the values plus the speed (before adding the speed to the falling object), that way before they overlap you can detect if an object is about to collide. when you know its about to collide you can just set its value to the top of the object its falling onto and set the speed to 0.
a fighter for a game ive been working on for the past month, pretty much all the enemys in this game are done this way. anyway i usually just like building them so they are all more detailed then they need to be, this one is just a wip. but i love the shape of it. anyway here it is. space fighter.
he gave you some good advice, and its the exact same thing i would do, put a trace in your hittest to see if its accually working
trace("GROUNDHIT");
put that inside your hittest, if it pops up and says GROUNDHIT, then you know 100% the code inside the hittest is being exicuted. this helps because it narrows down where errors come from.
onClipEvent(enterFrame) {
if(Key.isDown(Key.RIGHT)) {
_root.man.gotoAndStop(3);
_x+=5;
}else {
_root.man.walkright.gotoAndStop(1);
}
if(Key.isDown(Key.LEFT)) {
_root.man.gotoAndStop(4);
_x-=5;
}
else {
_root.man.walkleft.gotoAndStop(1);
}
}
you have to take a look at the if conditions... if the right key isnt down it will play frame 1, if the left key isnt down it will play frame 1... so its gonna always play frame 1 no matter what unless you press both at the same time. that would be the first thing i would fix.
a classic, the thompson... id like to see that.and i forget what its called it fires like .50 and has a scope.
this looks almost exactly the same as the last time you posted it, except now its got blood, which is awsome i think it adds alot. it would be cool if you could pick things up and throw them etc, i mean this is obviously a rcr clone missing some features, but its a nice game. as for graphics Id like to see more variety in the enemies. I hope you accually get finished this because I know it will do well here at newgrounds for sure.
At 3/30/09 01:01 PM, Kevvy wrote: Forgot to mention that as a minus it works fine, and also that I'm a coding simpleton, just seems strange that teh minus should work :P Thank again!
its because + can be used to attach two strings together, so useing it with a textbox could make it do that (1+1) would come up as 11, in order to avoid this, before updateing the display do the calculation
somevar = 1 + 1;
textbox = somevar;
i hope that makes sense.
At 3/29/09 08:55 PM, Frankmank wrote:At 3/29/09 07:28 PM, Paranoia wrote: All the theory is the same in both; it's just not got the event listeners and shizzle.this is my code, which isn't working
distanceSquared = xDistance * xDistance + yDistance * yDistance;
function Ticker():Void {
xDistance = ped1._x - player._x
yDistance = ped1._y - player._y
distanceSquared = xDistance * xDistance + yDistance * yDistance;
if (distanceSquared<10)
{
trace ("Working");
}
}
distance = Math.sqrt(Math.pow(xDistance,2)+Math.pow (yDistance,2));
that should do it.
I really liked being able to shoot at all times that was a great improovement, it felt like he moves slower now im not sure, but great engine so far, cant wait to see some mega gore heh.
thats an awsome arwing do you got any other views??
i like the lighting on that robot, although it seems a little dark
if (totalmoney <= 80){
gotoAndStop(3);
}
your useing the < (less than) you need to be useing >
yeah id rather see him with rockso the clown, i do c-c-ccocainnnnnnn
At 3/19/09 02:35 PM, Denvish wrote: No whitespace unless absolutely necessary, and as much as possible one one line. Every line commented. eg (bbs formatting will probably break this)
are you trying to make my brain explode?
id watch it i guess. I'd just make sure to mention who he is because theres alot of us who arnt to political.
wow its like his forehead is the same size as the lower half of his face perfectly, i find that amazeing, he already looks like a cartoon caracter. and also I have no idea who he is.
what i would do is set the movie to 60 fps and just double up on all the other frames if possible. I know thats alot of work but ive never heard of anyone successfully doing what your suggesting. its either that or find a way to make it look good at 30 fps.
well im not sure about that other frames thing, but if you declare your vars on the main timeline, im pretty sure you cant access them without haveing _root. in front of them, since there scope is the main timeline and your trying to just access them inside a button.
i would change every reference to a variable in that code to include _root. in front of it, i could be mixed up here but I think that should work.
are they all declared on the main timeline?
the first time you posted that you had _root. attached now its gone... maybe that?
that looks cool keep it comeing
cool i look forward to the video.
i like your 3d work, what program are you useing?
your going to have to ask again, and this time make it readable
i coded an example out that uses the arrow keys to move, and the a and z keys to zoom in and out. as you can see its pretty simple.
onClipEvent(load){
//////////
// INIT //
_root.imgMap._x = 0;
_root.imgMap._y = 0;
_root.imgMap._xscale = 100;
_root.imgMap._yscale = 100;
camx = 0;
camy = 0;
camzoom = 100;
}
//////////
// MAIN //
onClipEvent(enterFrame){
////////////////
// USER INPUT //
if(Key.isDown(Key.UP)){
camy += 5;
}
if(Key.isDown(Key.DOWN)){
camy -= 5;
}
if(Key.isDown(Key.LEFT)){
camx += 5;
}
if(Key.isDown(Key.RIGHT)){
camx -= 5;
}
if(Key.isDown(65)){
camzoom += 5;
}
if(Key.isDown(90)){
camzoom -= 5;
}
////////////////////
// UPDATE DISPLAY //
_root.imgMap._x = camx * (camzoom * 0.01);
_root.imgMap._y = camy * (camzoom * 0.01);
_root.imgMap._xscale = camzoom;
_root.imgMap._yscale = camzoom;
}
thats what i was saying, it would be best to save those variables. then when makeing the x and y scale bigger you would have to multiply your x and y positions by the scale to keep it "centered" on where its supposed to be.
if your zoomed in 10%, your camera would need to move 10% farther then the saved camera positions.
the bullet completely missed, it went right through the edge of the oval. sorry thats the best i can do heh