PDA

View Full Version : Gaming



Nemonin
September 14th, 2003, 04:25 PM
Hi, I have been previously working on a game. It works quite fine but there a few things that I don't not have the skill to know. I was wondering if you could help me make it so that when a hit test happens the object that got hit plays. Also I'm not sure if it is possible to make it so when a dynamic text box with a name of score reaches a point it will move the movie to a different scene. If you could help me that would be great. Thanks.

schling
September 14th, 2003, 05:50 PM
Search the kirupa for "hit test"
Flashkit might also have some scripts for that.

The number should also be quite simple.

Nemonin
September 14th, 2003, 06:07 PM
I would also like to know; that for a usual script when two objects collide the one you don't want will be put to visible false but I was wondering if it could delete itself?

Eric Jr.
September 15th, 2003, 06:51 AM
yes, you can delete a movieclip with the "removeMovieclip()" command...

If you tested the collision with the target object (not the one being removed) you do it like this:

hitobject.removeMovieClip();

Otherwise just delete itself:
this.removeMovieClip();

senocular
September 15th, 2003, 06:58 AM
just make sure it has a depth between 0 and 1,048,575. If it doesnt, use swapDepths to put it there before removing it ;)

Eric Jr.
September 15th, 2003, 07:47 AM
Lol, I doubt the fact that his depths exceed that range ...but you are right ...

senocular
September 15th, 2003, 07:53 AM
:) yeah depths go up as high as 2,130,690,045. AttachMovie is restricted to I think 1,048,575, but swapDepths and createEmptyMovieClip can go up that high. CreateEmptyMovieClip actually works higher, but the depth of the actual movieclip when placed in the movie won't be what it was set at.... not that you would probably ever need to go that high but its one of those things you can impress your friends with :P

Yeldarb
September 15th, 2003, 08:49 AM
how'd u find that out? have u actually created 2,130,690,045 movieclips?

senocular
September 15th, 2003, 11:00 AM
you can only create 16000 ;)