Page 1 of 1

Alle Level Done - Endscript

PostPosted: 20 Dec 2016, 20:33
by Oliver_Buo
How to make a End Script ?
Like in "Fionas World"
When alle Level are done ? :think:

Re: Alle Level Done - Endscript

PostPosted: 20 Dec 2016, 20:46
by VNS
I don't understand. Is it like an ending credits screen, or a script to finish the current level?

Re: Alle Level Done - Endscript

PostPosted: 21 Dec 2016, 20:07
by Oliver_Buo
more like "ending credits screen"
When u finish ALL Levels from a World ?
(i saw that in fhe "fionas World")

Re: Alle Level Done - Endscript

PostPosted: 21 Dec 2016, 21:24
by VNS
I do not understand ANYTHING at all on how to do that. But I just checked the files of Fiona's World, and this seems to be all you have to do.

1. Make a level.
2. From the editor, go to sector > Sector Settings > Init script
3. Set the init script to Level.finish(true)
4. Find your world by going through this directory (Windows): C:\users\(Your username)\AppData\Roaming\SuperTux\supertux2\levels\(Your worldname)
5. Find the level you just created in SuperTux. Rename it to anything you want. For this example, I'll name it "my-extro.stl"
6. Create a file called "my-extro.txt" (Must be the same name as your original level name)
7. Paste this text into my-extro.txt :
{l Code}: {l Select All Code}
(supertux-text
  (background "backgrounds/extro.png")
  (music   "music/credits.ogg"   )
  (text "   This is a text. You
can edit this text anytime.

   Thanks for playing
- Oliver's World
  ")
)

8. Play your level. (From the actual game)

Hope that works. Never tested this.

Re: Alle Level Done - Endscript

PostPosted: 22 Dec 2016, 03:51
by VNS
Fix: Don't do number 2 and 3. Instead, do this:
Below the main spawnpoint (2 blocks below), set a script trigger with the script at Level.finish(true);
Maybe that would work?

Re: Alle Level Done - Endscript

PostPosted: 22 Dec 2016, 03:55
by VNS
Actually, completely ignore my suggestions above; I've gone and started testing these and they don't seem to work.

Re: Alle Level Done - Endscript

PostPosted: 23 Dec 2016, 15:21
by Oliver_Buo
Thank u anyway......
Just in case i found out how it works i let u know :cool:

Re: Alle Level Done - Endscript

PostPosted: 24 Dec 2016, 12:26
by Oliver_Buo
I like to do someting like this;

https://youtu.be/-JlMWsYTphg?t=6m40s

Re: Alle Level Done - Endscript

PostPosted: 24 Dec 2016, 12:35
by Tobbi

Re: Alle Level Done - Endscript

PostPosted: 24 Dec 2016, 15:15
by Oliver_Buo
D: Hat bei mir nicht funktioniert. Ich bin was das Programmieren angeht noch ein Anfänger und brauche noch etwas Hilfe.
Wo muss ich das markierte Script genau hinein schreiben ?
Und was genau Zeilen 480 + 481 ?
Ich habe mir extra den Letzten Level von Fiona nochmals angesehen, habe aber das script gar nicht gefunden.... :?

Soll das Script unter Sektoreinstellung -> Initialisierungsscript stehen oder ein Scrippt Tigger im Spiel ?
Beim Sequenz Tigger kann ich ja kein Script reinschreiben als wird's der nicht sein ?
Und unter Punkte "Endsequenz" weis-grüner block (gab es schon In Tux Editor 0.1.3) auch nicht verwenden ?
(ich hoffe Googel übersettz das einigermassen verständlich) :)

Vielen Dank für die Hilfe
ps: wenn's nicht klappt lasse ich es eben. Währe aber schon noch cool so eine Endsequenz.... :cool:
----------------------
E:
Did not work with me. I'm programming a novice and I need some help.
Where do I have to write the selected script exactly?
And what exactly lines 480 + 481 only?
I have looked at the last level of Fiona again, but the script was not found at all ....:?

Is the script under Sector setting -> initialization script or a Scrippt Tigger in the game?
With the Sequence Tigger, I can not write a script so as it will not be?
And under points "end sequence" white-green block (there already in Tux Editor 0.1.3) also not use?

THANK U

Re: Alle Level Done - Endscript

PostPosted: 24 Dec 2016, 15:32
by Tobbi
Moin,

das Script musst du im Weltkarten-Bearbeitungsmodus einfügen.
Du hast ja die Levelpunkte bei der Weltkarte. Da einfach die Optionen öffnen und du hast dann die Option "Outro-Script". Wenn du's nicht findest, dann kann ich es auch screencasten.

Re: Alle Level Done - Endscript

PostPosted: 26 Dec 2016, 17:14
by Oliver_Buo
Vielen Dank für Deine Hilfe!
Sorry dass ich an Weihnachten nochmals nachfrage, aber bei mir klappt es noch nicht.

Das Endscript auf der Karte habe ich gefunden und auch so hinein geschrieben.
Siehe Bilder 1-3
Bild 1 von "Filona"
Bilder 2+3 von mir (Buo_1)

End Fiona.JPG
Level Map END of (Fiona)


END 01 Buo.JPG
Buo 1


End 02 Buo.JPG
Buo 2



Als extro.txt file habe ich die von Bonus Level 1 genommen. Die ich dann entsprechend anpassen würde.

Problem 1 Bei Bonus 1 wird mir am Schluss gar nix angezeigt. :?
Problem 2 Die Extro.txt Datei von Fionas world finde ich (bei mir gar nicht). :o

Vermutung/ Problem 3 ;)

Die Daten z.B Bonus 1 etc. und meine Eigene Levels sind an verschiedenen Orten gespeichert.
Das spiel und Bonuslevels etc.
(A)
C:\super tux 05

Meine Eigenen Levels
(B)
C:\Users\......\SuperTux\supertux2\levels

Die Extro.TXT Datei habe ich natürlich am selber Ort gespeichert, wo auch meine Levels sind...

-- VIELEN DANK FÜR DIE HILFE -- :D

PS: Warum muss die Schrift gelb auf weisem Hintergrund sein beim Script schreiben? - kann man nicht so toll lesen.
...und copy paste geht nicht und insert ist auch nix. :think:

Re: Alle Level Done - Endscript

PostPosted: 29 Dec 2016, 15:05
by Oliver_Buo
Hallo Ich glaube ich hab's jetzt. (so mehr oder weniger klappt es jetzt)
Die Datei muss die Endung .stxt habe und nicht .txt (gleich wie Credits.stxt)
Dann klappt's bei mir.
Nochmals Danke für die Hilfe.
Das war jeztz eine echte knacknuss :D