Zurück   Flashforum > Flash > ActionScript > Spielkonzepte und Spieleprogrammierung

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 03-11-2006, 18:19   #1 (permalink)
mcm-web
 
Benutzerbild von deak
 
Registriert seit: Jun 2002
Ort: Germany
Beiträge: 945
jump n run

hi,

bin gerade dabei mich das erstemal mit nem jump n run spiel zu befassen.
benutz dafür das flash mx buch. jetzt meine frage, habe alles so gemacht
wie beschrieben doh leider funkts net. kann mir bitte jemand helfen?
habs schon im as forum gesetzt, leider keine antwort bekommen...
hoffe hier weiss jemand was.

hier mein script:

World = function ( loc, gridsize, map) {
this.loc = loc;
this.gridsize = gridsize;
this.map = map;
}


map = [
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,1,4,1],
[1,0,0,0,4,1,1,1,1,0,0,0,0,2,1],
[1,0,0,0,2,0,0,0,0,1,8,0,0,2,1],
[1,0,0,0,2,0,0,0,0,0,1,0,1,2,1],
[1,0,0,0,2,0,0,0,0,0,0,0,0,2,1],
[1,1,1,0,2,0,0,0,1,0,0,0,0,2,1],
[1,0,0,0,2,0,1,1,1,0,0,1,0,2,1],
[1,9,0,0,2,0,0,1,1,1,1,1,0,2,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
]

JumpNRun = new World ( scene, 14, map);

World.prototype.build = function () {
// Erstelle level daten
}
JumpNRun.build ();

for ( var k = 0; k < this.map.length; k++ ) {
for ( var i = 0; i < this.map[0].length; i++) {
trace ( this.map[k][i] );
// ausgabe array
}
}


SymbolID = "tile"+this.map[k][i];

if ( this.map[k][i] == 9 ) {
trace ("player erstellen und eigenschaften zuweisen");
} else { trace ("Elemente erstellt und posisioniert");
}



this.loc.attachMovie ( "tile" + this.map[k][i],
"tile" + k +"_" + i, num++, {
_x: i * this.gridsize, _y: k * this.gridsize } );

hab auch mal die datei angehängt...
ist extrem wichtig das ich das versteh...soll demnächst ein spiel
als abschluss arbeit machen.
deak ist offline   Mit Zitat antworten
Alt 03-11-2006, 18:23   #2 (permalink)
Spiritmonger
Gast
 
Beiträge: n/a
Was funktioniert den nicht?
  Mit Zitat antworten
Alt 03-11-2006, 18:34   #3 (permalink)
mcm-web
 
Benutzerbild von deak
 
Registriert seit: Jun 2002
Ort: Germany
Beiträge: 945
ja funzt halt net eigentlich sollte ja das level erscheinen.
hab mal die datei angehängt.
vielleicht kannst es dir mal anschauen.

danke
Angehängte Dateien
Dateityp: zip game.zip (6,2 KB, 27x aufgerufen)
deak ist offline   Mit Zitat antworten
Alt 09-11-2006, 15:31   #4 (permalink)
mcm-web
 
Benutzerbild von deak
 
Registriert seit: Jun 2002
Ort: Germany
Beiträge: 945
jump n run

kann mir hier niemand helfen?
echt wichtig......
deak ist offline   Mit Zitat antworten
Alt 09-11-2006, 15:35   #5 (permalink)
paranoid...
 
Benutzerbild von Geheimrat
 
Registriert seit: Aug 2002
Ort: Marburg
Beiträge: 1.003
PHP-Code:
World.prototype.build = function () {
// Erstelle level daten

...ist ja nur ne Vermutung...aber wenn "das Level erscheinen sollte", reicht dafür nicht nur ein Kommentar...da sollte schon mehr stehen als "Erstelle level daten"...
__________________
...ich sag's nur meinem Fanblog: ICH BLOGGE !
Geheimrat ist offline   Mit Zitat antworten
Alt 11-11-2006, 17:26   #6 (permalink)
Neuer User
 
Registriert seit: Oct 2006
Beiträge: 162
PHP-Code:
World = function ( locgridsizemap) {
    
this.loc loc;
    
this.gridsize gridsize;
    
this.map map;
}

World.prototype.build = function () 
{

    for ( var 
0this.map.lengthk++ ) {
        for ( var 
0this.map[k].lengthi++) {
            
trace this.map[k][i] );

            
this.loc.attachMovie "tile" this.map[k][i], 
                                                
"tile" +"_" inum++, {
                                        
_xthis.gridsize_ythis.gridsize } );            
        }
    }

}


map = [
       [
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
       [
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
       [
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
       [
1,0,0,0,0,0,0,0,0,0,0,0,1,4,1],
       [
1,0,0,0,4,1,1,1,1,0,0,0,0,2,1],
       [
1,0,0,0,2,0,0,0,0,1,8,0,0,2,1],
       [
1,0,0,0,2,0,0,0,0,0,1,0,1,2,1],
       [
1,0,0,0,2,0,0,0,0,0,0,0,0,2,1],
       [
1,1,1,0,2,0,0,0,1,0,0,0,0,2,1],
       [
1,0,0,0,2,0,1,1,1,0,0,1,0,2,1],
       [
1,9,0,0,2,0,0,1,1,1,1,1,0,2,1],
       [
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
       ]

JumpNRun = new World scene14map);


JumpNRun.build (); 
MaticPel ist offline   Mit Zitat antworten
Alt 14-11-2006, 10:17   #7 (permalink)
mcm-web
 
Benutzerbild von deak
 
Registriert seit: Jun 2002
Ort: Germany
Beiträge: 945
Jump

werds aml testen, dANKE
deak 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 18:18 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele