# Strange problem. need help, dont know how to describe it

**URL:** <https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341>\
**Category:** Uncategorized\
**Created:** [August 17, 2004, 9:43pm UTC](https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341 "2004-08-17T21:43:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdjstudios](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mdjstudios](https://forum.kirupa.com/u/mdjstudios)\
**Post date:** [August 17, 2004, 9:43pm UTC](https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341/1 "2004-08-17T21:43:14Z")

</div>

the torpedos should be coming out of the turret but they are coming out of the the middle of nowhere… hard to explain so plz look at the .fla…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2004, 4:14pm UTC](https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341/2 "2004-08-18T16:14:32Z")

</div>

you had the right idea when you replaced the this.\_rotation with \_root.s1.s2.turret.\_rotation. unfortunately you didn’t need to change it there. but you do need change it later on. the this.\_x value returns a value from the registration point of the turret’s parent, s2. you need to change:

```auto
_root.torpedo.duplicateMovieClip("lazer"+e, e);
_root["lazer"+e]._rotation = this._rotation;
_root["lazer"+e]._x = this._x;
_root["lazer"+e]._y = this._y;

```

… to …

```auto
_root.torpedo.duplicateMovieClip("lazer"+e, e);
_root["lazer"+e]._rotation = _root.s1.s2.turret._rotation;
_root["lazer"+e]._x = this._x + _root.s1._x + _root.s1.s2._x;
_root["lazer"+e]._y = this._y + _root.s1._y + _root.s1.s2._y;

```

and there you go

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2004, 4:16pm UTC](https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341/3 "2004-08-18T16:16:12Z")

</div>

I did notice that this stops working later on, and the torpedoes are fired in the same direction, regardless of where the shark is.

i think this is because the movement of the submarine is tweened. actionscripting it’s movement should resolve your problems here. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2004, 7:41pm UTC](https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341/4 "2004-08-18T19:41:42Z")

</div>

yes it fired one at the shark and the rest in one direction, i removed the motion tween and put AS to move it and still fired in one direciton. i made the sub stay in one spot and not move and still the same thing. maybe its the code?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 20, 2004, 7:48pm UTC](https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341/5 "2004-08-20T19:48:08Z")

</div>

argh can someone help me, i really want to finish my game :-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 9:09pm UTC](https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341/6 "2004-08-30T21:09:29Z")

</div>

hey, can you upload the fla?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 9:59pm UTC](https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341/7 "2004-08-30T21:59:13Z")

</div>

how often are you calling the code that dettermines the sharks location? it might be worth changing it to an onEnterFrame or something…??

Prophet.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 10:23pm UTC](https://forum.kirupa.com/t/strange-problem-need-help-dont-know-how-to-describe-it/61341/8 "2004-08-30T22:23:46Z")

</div>

no need for you guys’ help anymore, i just did it a sloppy way and finished a boring game…  
which i will amke again…
