Highlighted

i am having a problem with collisions

Participant ,
Mar 05, 2020

Copy link to clipboard

Copied

Hello, i am having problems with this script, when i target a movieclip I can do play(); or stop(); commans on it, but i cant do gotAndPlays or gotoAndStop() on it, with frame numbers or labels, here is the script thanks for help so much, raiz is my this variable

 

this.on("tick", update3.bind(this));
function update3(evt) {
var pt = this.mono1.left.machete.hit.localToLocal(this.mono1.left.machete.hit.dot1.x,
this.mono1.left.machete.hit.dot1.y, this.malo1.box);
if (this.malo1.hitTest(pt.x, pt.y)) {
alert("collision")
//console.log("collided");
raiz.malo1.play();
this.mono1.left.machete.stop(); //can
this.mono1.left.machete.gotoAndStop("malomuerto"); //cannot
//this.malo1.x += 2;

}
}

Views

27

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

i am having a problem with collisions

Participant ,
Mar 05, 2020

Copy link to clipboard

Copied

Hello, i am having problems with this script, when i target a movieclip I can do play(); or stop(); commans on it, but i cant do gotAndPlays or gotoAndStop() on it, with frame numbers or labels, here is the script thanks for help so much, raiz is my this variable

 

this.on("tick", update3.bind(this));
function update3(evt) {
var pt = this.mono1.left.machete.hit.localToLocal(this.mono1.left.machete.hit.dot1.x,
this.mono1.left.machete.hit.dot1.y, this.malo1.box);
if (this.malo1.hitTest(pt.x, pt.y)) {
alert("collision")
//console.log("collided");
raiz.malo1.play();
this.mono1.left.machete.stop(); //can
this.mono1.left.machete.gotoAndStop("malomuerto"); //cannot
//this.malo1.x += 2;

}
}

Views

28

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 05, 2020 0
Participant ,
Mar 05, 2020

Copy link to clipboard

Copied

solved thank you

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2020 0