Shootorial 3 Weird Missile Spawning

Subscribe to Shootorial 3 Weird Missile Spawning 6 posts

Sign in to reply


 
avatar for Blackdrazon Blackdrazon 126 posts
Flag Post

When I was running Shootorial 3, on page 7 I adjusted the spawn point of the missiles but instead of spawning from the centre they actually appeared in the top left. Naturally, the adjustment given later on the page didn’t exactly put the missiles on the nose. I just changed the values and moved on but I wanted to ask here what I did differently/wrong just to be sure.

I’ve been using explodingferret’s guides for the freeware programs but I’m not entirely sure that that’s the source of the problem, thus why I posted in the main forum.

If anyone else is having the same problems, adjusting _x + 85 and _y + 22 worked fine for me.

 
avatar for drizztthehunter drizztthehunter 20 posts
Flag Post

Are you sure the registration point of your SHip movieclip is set to the centre? it sounds like you left at the default when you converted it to a movie clip, which is top left…

 
avatar for explodingferret explodingferret 1505 posts
Flag Post

When I originally wrote the first guide that is exactly what the behaviour was… a couple of days later I went back to the guide and added some extra stuff to fix the registration. I guess you might not have gone back to check it since I did that. ;)

To clarify: in the SWF file format there’s no such thing as a “Registration point”. In SWF files (0,0) == top-left of a movie clip by default. The way the Flash IDE makes registration points work is to place a movieclip at an offset within another movieclip… which is exactly the way to fix it in swfmill too.

See the bottom of the first post here.

 
avatar for Blackdrazon Blackdrazon 126 posts
Flag Post

Sorry, but that’s not the problem, in fact, that’s what I first tested when it started to go wrong. In fact, for me the lasers start spawning from the top-left regardless of whether I adjust the registration point using your method or not! I just tested it again having the lines:

<clip id="Ship" class="Ship" import="assets/ship.png">
    <frame>
        <place id="ship.png" depth="16387" x="-39.5" y="-18.5" />
    </frame>
</clip>

is exactly the same as just:

<clip id="Ship" class="Ship" import="assets/ship.png" />

Weird.

Note: My depth number is different than yours because of the way I was fiddling around with things earlier, but changing it to match doesn’t… seem to effect things. I’m going to go test that but I’m leaving this up just in case someone comes across this while I’m doing it.

 
avatar for explodingferret explodingferret 1505 posts
Flag Post

You’ve got it a bit confused. There’s an “outer” clip and an “inner” clip. The idea is to load the image into the inner clip and then place it centred at the top-left corner of the inner clip. But… your outer clip is loading the image there. You need this:

…..
<clip id=“ship.png” import=“assets/ship.png”/>
…..
<library>
…..
<clip id=“Ship” class="Ship">
<frame>
<place id=“ship.png” depth=“16384” x=“-39.5” y=“-18.5”/>
</frame>
</clip>
…..

Notice that the import is on the inner clip, and it’s the inner clip which is placed at the offset.

Hate textile formatting!

 
avatar for Blackdrazon Blackdrazon 126 posts
Flag Post

Ah, yes, that’s exactly what I did! It also explains why my enemy ships were going invisible when I first placed them – I just didn’t notice the changes at the top of the frame tag! Thanks!

Sign in to reply