| Register--Login--Top 20 Posters--Search Topics |
Forum Main>>Flash tutorials>>Ship movement and fire tutorial in flash | ||
| Archbob Rank: Group: Head Administrator Posts: 187 IP Logged PM ID: 2 PM [Archbob] | Last replied to on Wed Jun 04, 2008 23:35:14 Edit Post|Quote This is discussion on the tutorial "Ship movement and fire in flash" listed http://www.flashninjaclan.com/tutorialpage.php?ID=35 |
| reelkill Rank: Group: members Posts: 2 IP Logged PM ID: 6 [PM reelkill] | Posted at Sun Apr 22, 2007 14:48:31 Edit post|Quote Now you need to add the following code to your onClipEvent(enterFrame) below the code that is used to move the ship. Code: if(Key.isDown(Key.SPACE)&&this.isshot==0) { this.isshot=1; _root.shot.duplicateMovieClip( "shot"+ this.shotcount, this.shotcount+4000 ); this.shotcount++; } else { this.isshot=0; } where exactly do i put the code?i just cant seem to figure it out i keep getting errors ----------------------------- www.freewebs.com/reelkill |
| Archbob Rank: Group: Head Administrator Posts: 187 IP Logged PM ID: 2 [PM Archbob] | Posted at Sun Apr 22, 2007 15:06:58 Edit post|Quote You need to put that in your ship movie clip. Download my example and take a look. |
| reelkill Rank: Group: members Posts: 2 IP Logged PM ID: 6 [PM reelkill] | Posted at Tue Apr 24, 2007 21:46:12 Edit post|Quote yeah i did not add all the code at the end for the ship correctly, the example did the trick thanks, if i ever make anything good i will let you know. ----------------------------- www.freewebs.com/reelkill |
| lbivlife Rank: Group: members Posts: 2 IP Logged PM ID: 763 [PM lbivlife] | Posted at Wed Jun 04, 2008 22:21:20 Edit post|Quote any way to make it if you absorb 2 powerups you get 3 shots instead of two?... i need to do it for my comp class, and my teachers code looks exactly like yours |
| Archbob Rank: Group: Head Administrator Posts: 187 IP Logged PM ID: 2 [PM Archbob] | Posted at Wed Jun 04, 2008 23:35:14 Edit post|Quote Just make another variable called shot level and keep track of how many power-ups you've collect and adjust the number of shots accordingly. |
Page: 1 |