Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 21-10-2005, 15:47   #1 (permalink)
Neuer User
 
Registriert seit: Oct 2005
Beiträge: 74
Question Jump-and-run spiel

HI!
ich bin grad dabei ein jump-and run spiel zu programmieren..
hab aber noch ein paar probleme wengan springen.. also springen kann mein maxl schon.. aber wenn er aufkommt landet er immer unter der linie, auf der er landen soll..
kann mir irgendwer ein script dafür geben..
also auch mit springen... (meins is glaub ich nicht grad sehr professionell )
danke schon im voraus
spong3bob ist offline   Mit Zitat antworten
Alt 21-10-2005, 16:08   #2 (permalink)
experience++;
 
Benutzerbild von salazar
 
Registriert seit: Jul 2002
Ort: Düsseldorf
Beiträge: 11.347
hi und willkommen im flashforum.

der folgende link ist für mich einer der besten game tutorial links überhaupt... wirste sicher viel von lernen können...

http://www.tonypa.pri.ee/tbw/

cya, sal
__________________
Bitte keine Flashfragen an mich schicken. Dafür ist ja das Forum da! Das betrifft auch Profilnachrichten.
Chuck Norris hat den Flash Player für alle mobilen Betriebssysteme!
salazar ist offline   Mit Zitat antworten
Alt 21-10-2005, 17:29   #3 (permalink)
debugger
 
Benutzerbild von Flashenposter
 
Registriert seit: Oct 2005
Ort: Wien
Beiträge: 58
ActionScript:
  1. onClipEvent(enterFrame){
  2.  
  3. if((_root.jumpl+_root.jumpr+ _root.jumpu)==0){  //Wenn ihr eine Luftlenkung haben //wollts, verschiebt diese Zeile //dorthin, wo DA steht
  4.         if(Key.isDown(Key.LEFT)){
  5.             _x-=10;
  6.             _root.fg.bein.play();
  7.             _xscale=100;
  8.         }
  9.    
  10.         if(Key.isDown(Key.RIGHT)){
  11.             _x+=10;
  12.             _root.fg.bein.play();
  13.             _xscale=-100;
  14.         }else if(!(Key.isDown(Key.LEFT))){
  15.             _root.fg.bein.stop();       
  16.         }   
  17.    
  18.                                 //DA
  19.     if(Key.isDown(Key.UP)){
  20.         if(Key.isDown(Key.LEFT)){
  21.             _root.jumpl=1;
  22.         }
  23.         if(Key.isDown(Key.RIGHT)){
  24.             _root.jumpr=1;
  25.         }
  26.         if(!Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)){
  27.             _root.jumpu=1;
  28.         }
  29.     }
  30. }
  31.    
  32.     if(_root.jumpl==1){
  33.         _root.yplus-=2;
  34.         _y-=_root.yplus;
  35.         _x-=_root.xplus;
  36.         if(_root.yplus>0){
  37.             _root.xplus+=2;
  38.         }else{
  39.             _root.xplus-=2;
  40.         }
  41.        
  42.         if(_root.yplus<0 && _y>_root.startpo){
  43.             _root.yplus=_root.starty;
  44.             _root.xplus=0;
  45.             _root.jumpl=0;
  46.         }
  47.     }
  48.    
  49.     if(_root.jumpr==1){
  50.         _root.yplus-=2;
  51.         _y-=_root.yplus;
  52.         _x+=_root.xplus;
  53.         if(_root.yplus>0){
  54.             _root.xplus+=2;
  55.         }else{
  56.             _root.xplus-=2;
  57.         }
  58.        
  59.         if(_root.yplus<0 && _y>_root.startpo){
  60.             _root.yplus=_root.starty;
  61.             _root.xplus=0;
  62.             _root.jumpr=0;
  63.         }
  64.     }
  65.    
  66.     if(_root.jumpu==1){
  67.         _root.yplus-=2;
  68.         _y-=_root.yplus;       
  69.         if(_root.yplus<0 && _y>_root.startpo){
  70.             _root.yplus=_root.starty;
  71.             _root.xplus=0;
  72.             _root.jumpu=0;
  73.         }
  74.     }
  75.    
  76.     if(_root.jumpl==0 && _root.jumpr==0 && _root.jumpu==0){
  77.         _root.startpo=354;
  78.         _y=354;
  79.     }
  80. }
ROOTVARIABLEN:
starty=20;
jumpl=0;
jumpr=0;
jumpu=0;
xplus=0;
yplus=starty;

Geändert von Flashenposter (21-10-2005 um 17:33 Uhr)
Flashenposter ist offline   Mit Zitat antworten
Alt 21-10-2005, 17:29   #4 (permalink)
Neuer User
 
Registriert seit: Oct 2005
Beiträge: 74
Danke !
die seite hat echt viel geholfen!!
spong3bob ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 17:35 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele