Ich habe ein Problem:
Ich bastle gerade an einem Menü. Als Cursor wollte ich eine Zielscheibe benutzen, die jedes mal, wenn man ein Menüpunkt anwählt, die Zielscheibe auftaucht und wenn man den Menüpunkt verlässt, sie wieder verschwindet. Wenn der Eingangseffekt fertig ist, soll ein Rechteck von links einlaufen (das funktioniert).
Mein Problem: Die Zielscheibe wird nicht angezeigt, aber das Programm wartet auf den nächsten Befehl, als ob es da währe.
Mein Event sieht folgendermasen aus:
Create Event:
set variable action to 0
set variable drw_wdth_max to 400
Step Event:
if main_menu.cursor_pos is equal to 1
if action is equal to 0
set the sprite to cursor_create with subimage 0 and speed 1
set variable action to 1
set variable drw_wdth to 0
else
if action is equal to 2
if drw_wdth is smaller than drw_wdth_max
set variable drw_wdth relative to +30
else
if action is not equal to 4
set the sprite to cursor_destroy with subimage 0 and speed 1
set variable action to 4
Other Event: Animation End:
if action is equal to 1
set the sprite to cursor_normal with subimage 0 and speed 1
set variable action to 2
else
if action is equal to 4
set the sprite to no_sprite with subimage 0 and speed 1
set variable action to 0
Draw Event:
if action is equal to 2
set the drawing color to 65280
draw rectangle with vertices (main_menu.distance_3,1*main_menu.distance_2+main_menu.distance_1) and (main_menu.distance_3+drw_wdth,1*main_menu.distance_2+main_menu.distance_1+main_menu.distance_4), outline
Variablenübersicht:
distance: Entfernungen(das funktioniert)
action: bei 0: Zielscheibe ist nicht sichtbar
bei 1: Eingangseffekt
bei 2: Zielscheibe steht
bei 4: Ausgangeffekt
Sprites:
cursor_create: Eingangseffekt
cursor_destroy: Ausgangseffekt
cursor_normal: Cursor steht
Ich bastle gerade an einem Menü. Als Cursor wollte ich eine Zielscheibe benutzen, die jedes mal, wenn man ein Menüpunkt anwählt, die Zielscheibe auftaucht und wenn man den Menüpunkt verlässt, sie wieder verschwindet. Wenn der Eingangseffekt fertig ist, soll ein Rechteck von links einlaufen (das funktioniert).
Mein Problem: Die Zielscheibe wird nicht angezeigt, aber das Programm wartet auf den nächsten Befehl, als ob es da währe.
Mein Event sieht folgendermasen aus:
Create Event:
set variable action to 0
set variable drw_wdth_max to 400
Step Event:
if main_menu.cursor_pos is equal to 1
if action is equal to 0
set the sprite to cursor_create with subimage 0 and speed 1
set variable action to 1
set variable drw_wdth to 0
else
if action is equal to 2
if drw_wdth is smaller than drw_wdth_max
set variable drw_wdth relative to +30
else
if action is not equal to 4
set the sprite to cursor_destroy with subimage 0 and speed 1
set variable action to 4
Other Event: Animation End:
if action is equal to 1
set the sprite to cursor_normal with subimage 0 and speed 1
set variable action to 2
else
if action is equal to 4
set the sprite to no_sprite with subimage 0 and speed 1
set variable action to 0
Draw Event:
if action is equal to 2
set the drawing color to 65280
draw rectangle with vertices (main_menu.distance_3,1*main_menu.distance_2+main_menu.distance_1) and (main_menu.distance_3+drw_wdth,1*main_menu.distance_2+main_menu.distance_1+main_menu.distance_4), outline
Variablenübersicht:
distance: Entfernungen(das funktioniert)
action: bei 0: Zielscheibe ist nicht sichtbar
bei 1: Eingangseffekt
bei 2: Zielscheibe steht
bei 4: Ausgangeffekt
Sprites:
cursor_create: Eingangseffekt
cursor_destroy: Ausgangseffekt
cursor_normal: Cursor steht
Wen jemant Recktshreibfeler oder Gramatikfeler finden tun, darf er bealten sie 
