• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

GERMAN + ENGLISH- Dialogs

Level 3
Joined
Dec 28, 2003
Messages
15
DIALOG

TUTORIAL-Dialog

=================
1.Erklärung:
=================
Was ist ein Dialog?
3766306438313162.jpg

Ein Dialog ist ein Fenster im Spiel. Der Spieler erhält somit eine Auswahl von gewissen Funktionen.

Die Funktionen:

Dialog-Show/Hide
Zeigt/Verbirgt einen Dialog

Dialog-Change Title
Verändert den Titel eines Dialoges

Dialog-Create Dialog Button
Erstellt einen Dialog

Dialog-Clear
Löscht einen Dialog

=================
2.Beispiel
=================
Wir wollen einen Dialog erstellen, wenn Spieler 1 den Kaufmann auswählt.Im Dialog soll es
3 Buttons geben:-Heiltrank Kaufen
-Manatrank kaufen
-und wenn man nichts kaufen will den "Wiedersehen"-Button.
Das fertige Bild des Dialoges sieht man oben bei "Was ist ein Dialog?".Doch wie macht man das
jetzt?Hier sind die nötigen Auslöser:

In "DiaERstellen" erstellen wir den Dialog mit den zugehörigen Buttons.
Wir erstellen zuerst die Variablen:
-KaufDIALOG Typ: Dialog
-DialogButtonHeiltrank Typ: Dialog-Button
-DialogButtonManatrank Typ: Dialog-Button
-DialogButtonWiedersehen Typ: Dialog-Button

Auslöser DiaErstellen:
E:
Spieler-Spieler 1(Rot) Auswählen a unit
B:
(Triggering unit)Gleich KAUFMANN
A:
Dialog-Create a dialog button for KaufDIALOG labelled Heiltrank(200 GOLD)
set DialogButtonHeiltrank=(Last created dialog Button)
Dialog-Create a dialog button for KaufDIALOG labelled Manatrank(250 GOLD)
set DialogButtonManatrank=(Last created dialog Button)
Dialog-Create a dialog button for KaufDIALOG labelled Wiedersehen!
set DialogButtonWiedershen=(Last created dialog Button)
Dialog-Change the title ofKaufDIALOG to Was darf's sein?
Dialog-Zeigen KaufDIALOG for Spieler1(Rot)

Wir haben 3mal Dialog-Create a Dialog Button verwendet.Nach jeder Erstellung haben wir dann
den zueletzt erstellten Dialog-Button mit der entsprechenden Variable definiert.Dann haben
wir den Titel des Dialogs festgesetzt.AM SCHLUß haben wir den Dialog Gezeigt für Spieler.(Ich
weise am schluß dieses Tutorials nochmal daruf hin, warum Dialog-Show/Hide am Schluß stehen
muss.)


Nun zum Auslöser, wenn Spieler1 den Dialog-Button Heiltrank drückt.

Auslöser DialogButtonHeiltrankDRUCK:
E:
Dialog-A dialog button is clicked for KaufDIALOG
B:
(Clicked Dialog button)Gleich DialogButtonHeiltrank
A:
Dialog-Clear Dialog
Spieler-Set Spieler 1(Rot)Aktuelles Gold to((Spieler1(Rot)Aktuelles Gold)-200)
Held-Create a Heiltrank an give it to HELD

Als Ereigniss ist "Dialog-Dialog Button Click", also wenn jemand einen Button klickt im
Dialog(Hier:KaufDIALOG). Die Bedinung ist, dass der geklickte Dialog-Button
unser definierter Dialog-ButtonDialogButtonHeiltrank sein muss.
Die Aktionen sind ganz simpel:
-Löschen des Dialogs (Durch Dialog-Clear)
-200 Abziehen vom Gold des 1.Spielers
-Den Heiltrank erstellen und dem HELD geben

Die Auslöser für die anderen zwei Buttons verlaufen genauso:

Auslöser DialogButtonManatrankDRUCK:
E:
Dialog-A dialog button is clicked for KaufDIALOG
B:
(Clicked Dialog button)Gleich DialogButtonManatrank
A:
Dialog-Clear Dialog
Spieler-Set Spieler 1(Rot)Aktuelles Gold to((Spieler1(Rot)Aktuelles Gold)-250)
Held-Create a Manatrank an give it to HELD


Auslöser DialogButtonHeiltrankDRUCK:
E:
Dialog-A dialog button is clicked for KaufDIALOG
B:
(Clicked Dialog button)Gleich DialogButtonWiedersehen
A:
Dialog-Clear Dialog

Hier ist nur der Unterschied, dass nichts gekauft ist, also kein abzeiehn von Gold und
kein geben eines Gegenstandes.


Damit hätten wir unseren Dialog geschafft.Wer alles im Welt-Editor betrachten will sollte sich
die Beispielmap: http://home.pages.at/shorikon/Bsp Sichbarkeits-Modifiaktor und Dialog.zip ansehen.


Nun zu den der Frage: Warum nicht Show/Hide am Anfang?
Antwort: Wenn man Dialog-Show/Hide am Anfang hinstellt dann wird der DIALOG GEZEIGT, BEVOR
DIE BUTTONS ERSTELLT WURDEN.Das würde dann Folgendes auf sich haben: Im Spiel wird dieser
Dialog gezeigt:

400_6435376166373539.jpg


Der Spieler könnte gar nichts mehr machen. Die einzige möglichkeit rauszukommen wäre mit
Alt+TABULATOR und das Spiel von außen zu schließen.


Viel Spaß beim ausprobieren.

Wünscht Nemesis[DK]
 
Level 3
Joined
Nov 2, 2004
Messages
49
I hope you can understand my translation. Because I'm not a god at English ^^

Nemesis[DK said:
]DIALOG


TUTORIAL-Dialog

=================
1.Erklärung:
=================
What is a dialog?
3766306438313162.jpg

A dialog is a window in the game. The player gets the Choice between special functions.

The functions:

Dialog-Show/Hide
Shows/Hides a dialog

Dialog-Change Title
CHanges the title of a dialog

Dialog-Create Dialog Button
creates a dialog

Dialog-Clear
Clears a dialog

=================
2.Example
=================
We like to create a dialog when Player 1 selects the merchant. In the dialog shall be 3
buttons:
-Purchase Healing Potion
-Purchase Mana-Potion
-And when you don't want to buy anything the "See you later"-button.
The finished Picture of a dialog can be viewed above at "What's a dialog?". But how can that be
done now? Here are the needed triggers:

In "DialogCreate" we create a dialog with the buttons.
First we create the variables:
-PurchaseDialog Type:Dialog
-DialogButtonHealingPotion Type:Dialog-Button
-DialogButtonManapotion Type:Dialog-Button
-DialogButtonSeeYouLater Type:Dialog-Button

Trigger DialogCreate:
E:
Player-Player 1(Red) Selects a unit
B:
(Triggering unit)IS MERCHANT
A:
Dialog-Create a dialog button for PurchaseDIALOG labelled Healing-Potion(200 GOLD)
set DialogButtonHeiltrank=(Last created dialog Button)
Dialog-Create a dialog button for PurchaseDIALOG labelled ManaPotion(250 GOLD)
set DialogButtonManatrank=(Last created dialog Button)
Dialog-Create a dialog button for PurchaseDIALOG labelled See you later!
set DialogButtonWiedershen=(Last created dialog Button)
Dialog-Change the title ofPurchaseDIALOG to What can I serve with?
Dialog-Zeigen PurchaseDIALOG for Player 1(Red)

We used 3 times Dialog-Create a dialog button. After each creation we have defined the last created
dialog button with the special variable. Then we defined the title of the dialog. AT THE END we showed
the dialog for Player



Now the trigger, when Player 1 presses the dialog button Healing-Potion.

Auslöser DialogButtonHealingPotionPRESS:
E:
Dialog-A dialog button is clicked for PurchaseDIALOG
B:
(Clicked Dialog button)Gleich DialogButtonHealingPotion
A:
Dialog-Clear Dialog
Spieler-Set Player 1(Red)Current Gold to((Player 1(Red)Current Gold)-200)
Hero-Create a Healing Potion and give it to HERO

The event is "Dialog-Dialog button Click", so when someone clicks a button in the
dialog(Hier:PurchaseDIALOG). The Condition is that the clicked
dialog button has to be the one we defined as dialog button DialogButtonHealingPotion
The actions are very simple:
-Clear the dialog (with Dialog-Clear)
-remove 200 from gold of First Player
-Create Potion and give it to the Hero


The triggers for the other two buttons are similar:

Auslöser DialogButtonManapotionPRESS:
E:
Dialog-A dialog button is clicked for PurchaseDIALOG
B:
(Clicked Dialog button)Gleich DialogButtonManaPotion
A:
Dialog-Clear Dialog
Spieler-Set Player 1(Red)Current Gold to((Player1(Red)Current Gold)-250)
Hero-Create a Mana Potion and give it to HERO


Auslöser DialogButtonHealingPotionPRESS:
E:
Dialog-A dialog button is clicked for PurchaseDIALOG
B:
(Clicked Dialog button)IS DialogButtonSeeYouLater
A:
Dialog-Clear Dialog

Now here'S the difference between that there isn't bought anything, so no gold is removed
and not giving an item.


Now we have finished our dialog. Thise who want to see everything in the World Editor shall
download this ExampleMap: http://home.pages.at/shorikon/Bsp Sichbarkeits-Modifiaktor und Dialog.zip .


Now there's still the question: Why NOT Show/Hide at the beginning?
Answer: If you move SHow/Hide to the start then the dialog will be shown BEFORE the BUTTONS are
created. That would be followed by this: In the game the dialog would look like this:

400_6435376166373539.jpg


The Player won't be able to do anything except pressing ALT+TABULATOR and quit the game
Outside of it.


Have Fun Trying!

Wishes Nemesis[DK]
 
Level 3
Joined
Nov 2, 2004
Messages
49
Nemesis, you can change the title of this tutorial now i think, so more users will see it ;)

MfG JunJee
 
Top