Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 17-02-2005, 13:56   #1 (permalink)
Neuer User
 
Registriert seit: Aug 2004
Beiträge: 27
kurze schnelle Frage: x || (x && x)

Ich frage in einem Spiel Ereignisse ab, die nur selten vorkommen, aber eben passieren. Da ich keine Lust hab, zu testen bis das mal eintritt, hier meine Frage:
Darf ich sowas?

Code:
	while (tempactiontile == "L" || (action_startpositiony == 0 && action_startpositionx == 0)) {
		action_startpositiony = (random(grid.length));
		action_startpositionx = (random(grid[1].length));
		tempactiontile = tilelist[grid[action_startpositiony][action_startpositionx]-gridsubtractor];
	}
es geht um das (x=="L"|| (x==0&&y==0))

also das AND in Klammern nach dem OR.

weiß das jemand?

thanx
René Walter ist offline   Mit Zitat antworten
Alt 17-02-2005, 13:56   #2 (permalink)
Neuer User
 
Registriert seit: Aug 2004
Beiträge: 27
hier der Code dazu:

while (tempactiontile == "L" || (action_startpositiony == 0 && action_startpositionx == 0)) {
action_startpositiony = (random(grid.length));
action_startpositionx = (random(grid[1].length));
tempactiontile = tilelist[grid[action_startpositiony][action_startpositionx]-gridsubtractor];
}
René Walter ist offline   Mit Zitat antworten
Alt 17-02-2005, 14:20   #3 (permalink)
God made me funky..
 
Registriert seit: Apr 2003
Ort: Bremen
Beiträge: 1.067
klar geht das, warum auch nicht.
__________________
Kunst ist in erster Linie eine Frage der Form und nicht des Inhalts
Paul Rand
e2e4 ist offline   Mit Zitat antworten
Alt 17-02-2005, 14:29   #4 (permalink)
Neuer User
 
Registriert seit: Aug 2004
Beiträge: 27
ew

Zitat:
Zitat von e2e4
klar geht das, warum auch nicht.
hab in dokumentationen nix dazu gefunden, hab aber mittlerweile ein testscript gefahren... geht so.
thanx
René Walter 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 20:52 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele