Moin Leute
Mein Spiel soll zufällig angeordnete Räume haben, immer die gleiche Anzahl und man soll von diesen auch spezielle Räume bestimmen können (z.B. Boss Raum).
Ich habe schon viel ausprobiert, leider hat noch nichts geklappt. Nach einer weile bin ich im Yoyogames Forum auf einen Thread gestoßen mit folgendem Coding:
Alles anzeigen
Und
Alles anzeigen
Da ich wirklich lange dran gesessen habe und leider nichts wirklich geschafft habe, wollte ich fragen, ob mir einer sagen könnte:
Wie und wo genau ich das einbauen muss?
Ob das überhaupt klappt?
Und ob ihr mit vielleicht noch ein paar Tipps geben könnt.
Ich freue mich sehr über Antworten!
- Meditroid
Mein Spiel soll zufällig angeordnete Räume haben, immer die gleiche Anzahl und man soll von diesen auch spezielle Räume bestimmen können (z.B. Boss Raum).
Ich habe schon viel ausprobiert, leider hat noch nichts geklappt. Nach einer weile bin ich im Yoyogames Forum auf einen Thread gestoßen mit folgendem Coding:
Quellcode
- global.rm_list=ds_lis_create(); //create the ds_list
- ds_list_add(rm_list, rm_1); //add all the rooms to the list...
- ds_list_add(rm_list, rm_2);
- ds_list_add(rm_list, rm_3);
- //etc for all the rooms...
- ds_list_shuffle(rm_list); //Shuffle the list so the rooms are in a random order...
- repeat(11) ds_list_delete(rm_list,0); //remove 11 rooms from the list and leave 9, the 10th will be the boss room
- var rm;
- rm=ds_list_find_value(rm_list,0); //Get the first room on the list
- ds_list_delete(rm_list, 0); //remove the room from the list
- room_goto(rm); //Gotot the first room!
Und
Quellcode
- //This would go in the object that controls the room when the player reaches the end...if !ds_list_empty(rm_list) //see if the list is empty or not
- {
- var rm;
- rm=ds_list_find_value(rm_list,0); //Get the first room on the list
- ds_list_delete(rm_list, 0); //remove the room from the list
- room_goto(rm); //Gotot the first room!
- }
- else
- {
- //List is empty! Goto the boss room!
- room_goto(rm_Boss);
- }
Da ich wirklich lange dran gesessen habe und leider nichts wirklich geschafft habe, wollte ich fragen, ob mir einer sagen könnte:
Wie und wo genau ich das einbauen muss?
Ob das überhaupt klappt?
Und ob ihr mit vielleicht noch ein paar Tipps geben könnt.

Ich freue mich sehr über Antworten!
- Meditroid