Strike Force Heroes 2
The explosive sequel to the hit game Strike Force Heroes!
3.95 / 5.00 8,157 ViewsObsolescence
Defeat the enormous mechanical beasts--and become one of them.
4.01 / 5.00 41,294 ViewsNeed some more help...
Does anyone know some actionscript that will detect when my moving object hits it then change the frame?
Cheers,
MiniNova.
Murad136, heres your fucking credit ;3
Hits what?
im assuming you just want a simple hit detection so here it is:
if (this.hitTest(_root.movingobject)){
_root.movingobject.gotoAndStop(2);
}
Put that in whatever you want to hit with the moving object.
If you are reading this then you must be really bored.
At 10/14/07 12:20 PM, MrCrinkle wrote: Hits what?
im assuming you just want a simple hit detection so here it is:
if (this.hitTest(_root.movingobject)){
_root.movingobject.gotoAndStop(2);
}
Put that in whatever you want to hit with the moving object.
thanks but it came up with:
________________________________________
________________________________________
__________
**Error** Scene=Scene 1, layer=Walls, frame=1:Line 1: Statement must appear within on/onClipEvent handler
if (this.hitTest(_root.movingobject)){
Total ActionScript Errors: 1 Reported Errors: 1
________________________________________
________________________________________
__________
I want is if my object (that moves with the arrow keys) hits a wall (the wall is a movie clip) the whole movie will change to a different keyframe.
At 10/14/07 12:25 PM, MiniNova wrote: stuff
onClipEvent(enterFrame){
if(this.hitTest(_root.wall){
_root.gotoAndPlay(frame);
}
}
Try that
At 10/14/07 12:27 PM, 7IsUnlucky wrote:At 10/14/07 12:25 PM, MiniNova wrote: stuffonClipEvent(enterFrame){
if(this.hitTest(_root.wall){
_root.gotoAndPlay(frame);
}
}
Try that
it looks like it'll work... do i have to do the instance name of teh wall where it sez. So it'll look like this:
(_root."instance name")
I tried it normal but it said there was errors.
At 10/14/07 12:36 PM, MiniNova wrote: it looks like it'll work... do i have to do the instance name of teh wall where it sez. So it'll look like this:
(_root."instance name")
I tried it normal but it said there was errors.
*sigh*
What's the instance name of your wall?
At 10/14/07 12:43 PM, 7IsUnlucky wrote:At 10/14/07 12:36 PM, MiniNova wrote: it looks like it'll work... do i have to do the instance name of teh wall where it sez. So it'll look like this:*sigh*
(_root."instance name")
I tried it normal but it said there was errors.
What's the instance name of your wall?
I dont have oneee yet, sorry i'm really crap aint i. Still thx for da help.
Umm gimme the actionscript and tell me the new instance name of the wall.
At 10/14/07 12:46 PM, MiniNova wrote: I dont have oneee yet, sorry i'm really crap aint i. Still thx for da help.
Umm gimme the actionscript and tell me the new instance name of the wall.
WALL
onClipEvent(enterFrame){
if(this.hitTest(_root.wall){
_root.gotoAndStop(2);
}
}
is that right....? it dont work :'(
At 10/14/07 01:02 PM, MiniNova wrote: onClipEvent(enterFrame){
if(this.hitTest(_root.wall)){
_root.gotoAndStop(2);
}
}
That should work. (i put an extra bracket in)
okay thx for all ur help ur names will b in the credits...