PDA

View Full Version : Hit.Test For detecting laser to Character collision



cybergold
October 4th, 2002, 12:38 PM
Anyone know how i can get these lasers to work in the correct manner. For some reason, 2-3 seconds in the game, the game goes to the next frame. I can't get the second player's fire to stick with him as he travels across the screen. Here's the fla.

cybergold
October 4th, 2002, 12:38 PM
I am using Flash 5

Jubba
October 4th, 2002, 12:55 PM
well, your first 'if statement' on your lazers were empty:



onClipEvent (enterFrame) {
if (this._name<>"laserr") {
}
this._x -= laserrMoveSpeed;
if (this._x>600) {
this.removeMovieClip();
}
}


I changed this one to:



onClipEvent (enterFrame) {
if (this._name<>"laserr") {
this._x -= laserrMoveSpeed;
if (this._x>600) {
this.removeMovieClip();
}
}
}


do the same to the other one, and it should work. then just try to debug as necessary.

cybergold
October 4th, 2002, 01:08 PM
The blue "laserr" won't take the "enemy" ship as it's source, what do i do?(won't fire blue laser, blue laser located at a certain x/y position every time you fire. does not stick to the ship) Do you know how i can get letters as controls, they won't work

cybergold
October 4th, 2002, 01:23 PM
I found out why the game says game over(frame 2) because the hit.Test which i put it in detects the invisible MC of the laser clip which is continually looping over and over. Anyone know how i can get rid of this one?

Jubba
October 4th, 2002, 02:48 PM
The answer to that is switching the IF statement. That took care of it for me when I did it. That fixes it so that the Invisible Lazers don't read the hitTest

flex
October 4th, 2002, 03:06 PM
You can use if (this._name != "laserr"). That's from the David Duoll tuorial if I'm not mistaken. It's a good firing system. For just a two player simple shooter - you can use a much simpler firing system though.

flex
October 4th, 2002, 03:09 PM
P.S. You art seem to be better than mine. I've asked the designer dudes to help but had little response. Take a look at http://flex.funkyolive.com/test/newgamedemo.html

I the graphics here aren't original but I want to use original ones. If you can help out, let me know.

Here's the original thread http://www.kirupaforum.com/showthread.php?s=&threadid=6959&pagenumber=1 it's a long one.

flex
October 4th, 2002, 03:18 PM
I did say I wouldn't be helping out that much more but when it comes to gaming stuff, well, sometimes I can't resist it. See cybergold, you didn't the fla after all! Ive been a little busy but if you do I have take that homer business out.

cybergold
October 4th, 2002, 11:00 PM
Looking for designers/animators? well, i can't say i am that good in animating with pixels, but flash has simplified cartooning drastically. I could help you out in some fields, but i am severely limited in my concept of motion/moving characters around. Here is a vietnamese man i drew. I am having difficulty, getting boat motions and such though

cybergold
October 4th, 2002, 11:03 PM
here is the fla

flex
October 4th, 2002, 11:45 PM
If you're serious about gaming, watch the flashkit games forum, read Ed Mack and Friends of Ed tutorials, Mad Sci, Outside of Society and play around with techniques. I'm still learning, but have learnt alot from tutorials from these guys.

cybergold
October 4th, 2002, 11:48 PM
pm = Private Mail? if so, you'll have to send it again, i made it temporarily exclusive. try one more time though, it should work

flex
October 4th, 2002, 11:49 PM
I've sent you a private message. Click on User cp tab at the top, then Private messages. Let me know when you've got it so I can take it off line.

cybergold
October 4th, 2002, 11:52 PM
River2 is not working, can't think why not. Says "unexpected file format"

cybergold
October 4th, 2002, 11:55 PM
found how to use the PM

flex
October 4th, 2002, 11:58 PM
Did you get it?

cybergold
October 5th, 2002, 12:00 AM
Do you still want to keep the characters cartoon like? I will try making some characters with action, which game are you hoping to go with, the robot or kid one? give me some feedback

flex
October 5th, 2002, 12:01 AM
I'm going with the robot one.

cybergold
October 5th, 2002, 12:04 AM
Got it

flex
October 5th, 2002, 12:09 AM
Well if you read the thread - it's actually a cyborg kind, like the example - half man, half robot. Or a dude with funky armour.

cybergold
October 5th, 2002, 12:14 AM
can you send a Flash 5 version of the game project? Same problem as the MX version of the river. River2 is working ok.

cybergold
October 7th, 2002, 11:21 AM
I don't know how to ge the hit.Test to work in this game, any help would be appreciated. There is also an invisible laser which i would like to take out, but can't.