LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 


Prev Previous Post   Next Post Next
  #1  
Old 12-09-2009, 08:23 AM
Jagger Jagger is offline
Registered User
 
Join Date: Dec 2009
Location: Yugoslavia (Serbia And Montenegro)
Posts: 2
Rep Power: 0
Jagger is on a distinguished road
hero

does eny know how to make a hero shooting and kill enemie with this script??
Actionscript:
onClipEvent(load){
 this.stop();
    s=4;
 jumping=false;
 b = this.getBounds(this);
 function move(x,y){
  h=false;
  if(!_root.map.hitTest(_x+x+b.xmin,_y+y+b.ymin,true)){
   if(!_root.map.hitTest(_x+x+b.xmax,_y+y+b.ymin,true)){
    if(!_root.map.hitTest(_x+x+b.xmin,_y+y+b.ymax,true)){
     if(!_root.map.hitTest(_x+x+b.xmax,_y+y+b.ymax,true)){
      _x += x;
      _y += y; 
      h=true;
      } 
     }
    }
   }  
  return h;
 }
}
onClipEvent(enterFrame){
   if (_root.playGame) {
 falling = move(0,s);
    if(Key.isDown(Key.SPACE) && !falling &&  !jumping){ jumping = true; vel = -12;_root.jumpSound.gotoAndPlay(2);_root.hero.gotoAndPlay(4);}
 if(Key.isDown(Key.LEFT)) {move(-s,0); this.gotoAndStop(2); this.sonic.play();}
    if(Key.isDown(Key.RIGHT)) {move(s,0); this.gotoAndStop(1); this.sonic.play();}
 
 if(jumping) {
  if(vel <= 12){
   h = move(0,vel-s);
   if(h == false && vel < 0){ vel *= -1;}
   vel++;
  }
  else{
   jumping = false;
  }
  }
  }
}
onClipEvent (keyUp) {this.sonic.gotoAndStop(1);}
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Nice MMORPG made with Flash - Hero Mages FlashMove Cool Sites 0 08-03-2011 02:01 AM
Testing Game - Handbell Hero houc0015 Site Check 2 12-16-2007 05:58 PM
Hero roate and scroll cole07 Game Programming 1 06-14-2006 12:09 AM
Last ActionScript Hero - Site Launch lastashero Cool Sites 0 06-14-2004 08:51 PM
HERO BOY :: platform game to test ! thio valone Flash Games 1 06-30-2003 06:27 AM




All times are GMT. The time now is 08:03 AM.