Shootorials #3, #4, #5 and #6 with Free Tools - mtasc and swfmill page 2

Subscribe to Shootorials #3, #4, #5 and #6 with Free Tools - mtasc and swfmill 118 posts, 16 voices

Sign in to reply


 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

welll im uplaoding it now but its taking forever

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

http://www.mediafire.com/?sharekey=727cb4d010a75acfd2db6fb9a8902bda

try that link im pretty sure thats where i uploaded it to

 
avatar for explodingferret explodingferret 1354 posts
Flag Post

When I tried it I got an error about no such file source_assets/ship.png. So I renamed source_assets/Ship.png to source_assets/ship.png. Then it worked. Running the swf, when I press space I see the weird yellow lightning flash things.

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

yea those are my bullets for now

 
avatar for explodingferret explodingferret 1354 posts
Flag Post

Ah, there are a few things.

Firstly, you need to place the line I mentioned inside the <library> tags. Currently it is outside (above) them.

Secondly, you need to remove the existing clip that has id=“Missile”. Just delete those five lines.

Lastly, you don’t have a Missile.as! You’ll need to watch Shootorial #3 (linked in the top post) or download my completed source from the end of the top post.

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

i think i maybe deleted that but i should have it somewhere lol

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

btw what are u viewing the xml in? i have it in notepad and i cant see where anything really is

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

nvm i fixed everything

 
avatar for explodingferret explodingferret 1354 posts
Flag Post

Try using anything other than notepad. ;)

 
avatar for maki2012 maki2012 7 posts
Flag Post

…so can you put Kong API’s in?

 
avatar for explodingferret explodingferret 1354 posts
Flag Post

Of course! Since the API requires only changes to the ActionScript code, you can just follow the instructions in Shootorial #8 and it should just work.

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

any chance of you uploading the source code for the finished game?

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

post how to do the shield from shootorial 7 please

 
avatar for explodingferret explodingferret 1354 posts
Flag Post

Oh, you mean the filters thing? I guess you’d need to do that in the actionscript, but I have absolutely no idea how. The only way I know how to do it would be to create a ship picture with a glowing effect around it in an external bitmap image editing program and place it in the same frame as the ship with a higher depth, like so:


  <!-- above the library tag -->
  <clip id="ship.png" import="source_assets/ship.png"/>
  <clip id="shieldedShip.png" import="source_assets/shieldedShip.png"/>

......

      <!-- inside the library tag -->
      <clip id="Ship" class="Ship">
        <frame>
          <place id="ship.png" depth="16384" x="-39.5" y="-18.5"/>
          <place id="shieldedShip.png" name="shield" depth="16385" x="-39.5" y="-18.5"/>
        </frame>
      </clip>

Note, I didn’t call the linkage ID “shield” like it did in the shootorial, but since it doesn’t use attachMovie on it at any point in its code, that won’t matter. And make sure the two images are the same size, if you don’t want hit testing to go all funny.

 
avatar for maki2012 maki2012 7 posts
Flag Post

thanks for this stuff! who would want to blow $1500 on software:?

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

ok that worked now your gunna have to help me on the place id section of where my powerup.png should go in the library section

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

i also cant make my shots stop at the end of the screen so its too easy to just kill everything b4 it even gets where you can see it

 
avatar for explodingferret explodingferret 1354 posts
Flag Post

You don’t need a place tag for the powerup. Why would you need a powerup on your stage at the start of the game? Just use its id attribute in your code with attachMovie().

And the second thing is a coding issue you should be able to fix by looking through the Shootorials. It’s nothing to do with this thread. If you need help with it make a separate post on this forum.

 
avatar for ETHANR26 ETHANR26 543 posts
Flag Post

i know i shouldnt need a place tag but i cant get it to work

 
avatar for Zygote76 Zygote76 7 posts
Flag Post

I’m having issues with the 5th shootorial. When I get to page 9 of this part of the tutorial, that’s when things go a bit screwy.

var enemy = _root.attachMovie("EnemyShip", "EnemyShip" + _root.getNextHighestDepth(), _root.getNextHighestDepth()); enemies.push(<b>enemy</b>);

I receive an error stating that this is not a valid ID, So I tried changing it to EnemyShip and that allows it to work. However by the end of the tutorial my missiles do not pass the hit test therefore not exploding ships nor removing the movie clip instance of the missiles. Any ideas? I would like to finish this so that I can move forward and create my own style of shooter.

Btw my ship does pass the hit test and explodes the enemy ships when contact between the two ships is made.

 
avatar for explodingferret explodingferret 1354 posts
Flag Post

Changing which bit to enemy ship? The linkage ID is the first argument to attachMovie(), and you already have “EnemyShip” in there.

As for the other problem, it doesn’t seem related. Can you show me your Missile.as and the <clip id="Missile"> ... </clip> bit of the XML?

 
avatar for Zygote76 Zygote76 7 posts
Flag Post

sorry bout that I tried to bolden the section for you,

after
enemies.push
its has (enemy); but the word enemy so this error

**Error** C:\gameDevelopment\firstGame\Ship.as: Line 50: There is no property with the name 'enemy'. enemies.push(enemy);

here’s the ship class code:
class Ship extends MovieClip { var velocity; var shootLimiter; var enemyTimer; var enemies; function onLoad() { velocity = 10; shootLimiter = 0; enemyTimer = 0; enemies = []; } function onEnterFrame() { shootLimiter += 1; if( Key.isDown(Key.RIGHT) ) { _x = _x + velocity; } if( Key.isDown(Key.LEFT) ) { _x = _x - velocity; } if( Key.isDown(Key.UP) ) { _y = _y - velocity; } if( Key.isDown(Key.DOWN) ) { _y = _y + velocity; } if( Key.isDown(Key.SPACE) && shootLimiter > 8) { shootLimiter = 0; var missile = _root.attachMovie( "Missile", "Missile" + _root.getNextHighestDepth() , _root.getNextHighestDepth() ); missile._x = _x + 50; missile._y = _y + 2; } enemyTimer += 1; if(enemyTimer > 60) { enemyTimer = 0; _root.attachMovie("EnemyShip", "EnemyShip" + _root.getNextHighestDepth(), _root.getNextHighestDepth()); enemies.push(enemy); } } }

and the Missile
class Missile extends MovieClip { var speed; function onLoad() { speed = 20; } function onEnterFrame() { _x +=speed; for(var i in _root.ship.enemies) { if(this.hitTest( _root.ship.enemies[i] ) ) { this.removeMovieClip(); _root.ship.enemies[i].explode(); } } if(_x > 600) { this.removeMovieClip(); } } }

Thanks for the help, this has been something I have been interested in for some time and need a little more insightful tutorial to give me that shove.

 
avatar for Zygote76 Zygote76 7 posts
Flag Post

Is there a better way to enter that? I used my normal html tags but that did not come out looking the way I entered it. Sorry for the slop. Let me know and I can re-enter it.

It is a shame I cannot edit my initial post

Thanks

 
avatar for explodingferret explodingferret 1354 posts
Flag Post

Try <pre><code> … </code></pre>
You have this:

_root.attachMovie("EnemyShip", "EnemyShip" + _root.getNextHighestDepth(), _root.getNextHighestDepth());

It should be this:

var enemy = _root.attachMovie("EnemyShip", "EnemyShip" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
 
avatar for Zygote76 Zygote76 7 posts
Flag Post

That worked thanks!

I was trying not copy and paste and missed the var enemy addition XD

Sign in to reply


Click Here