• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

GERMAN - Mana/Life Bars In A Multiboard Using Icons

Level 3
Joined
Dec 28, 2003
Messages
15
Leben/Manabalken im Multiboard mit Icons

Hallo und willkommen bei diesem Tutorial für den Warcraft III Welt-Editor!

Was für Voraussetzungen gibt es?
Bei diesem Tutorial sollte man schon einige Erfahrungen mit dem Editor haben. Es werden
folgende Grundkenntnisse vorausgesetzt:
-Aufbau von Multiboards (Siehe dazu das Mutliboard-Tutorial)
-Umgang mit Variablen
-Bedingungen und Schleifen
-außerdem gewisse mathematische Kenntnisse

Warum mit Icons?
Im Gegensatz zu Zeichen, die im Computer nur in begrenzter Zahl zur Verfügung stehen, bieten
Icons eine gewisse Vielfalt an. Man kann verschiedenste Icons wählen, ihnen Formen
geben (Durch Transparenz machen) und natürlich Icons selber machen. Somit ergeben sich eine
fast unbegrenzte Anzahl von Ideen, die leicht umzusetzen sind.

Variablen
Zuerst sollten folgende Variablen erstellt werden (Ihr genauer Sinn wird in späteren Teilen des
Tutorials beschieben):
1024_3663653764663138.jpg



Das Multiboard
Unser Schluss-Multiboard soll so aussehen:
400_3637613832653937.jpg



Nun zu dem Auslöser, der dieses Multiboard erstellt:
1024_3833616365323335.jpg

Zuerst erstellen wir ein Multiboard. In diesem Beispiel mit 4 rows (row1: Lebenanzeige,row2:
Lebenicons, row3: Manaanzeige, row4: Manaicons) und 20 colums (Um so mehr columns, desto genauer
ist die Anzeige der Leben/ des Manas).
Als nächstes kommt der Style. Für row 1 u. 3 bestimmen wir, dass nur der Text angezeigt wird,
für row2 u.4 dagegen nur die Icons.
Nachdem die widths eingestellt worden sind, werden die Icons für row2 und row4 vergeben.
(balken/leben.blp = Volles Leben,dunkelrot; balken/lebenblank.blp = Leeres Leben,hellrot;
balken/mana.blp = Volles Mana,dunkelblau; balken/manablank.blp = Leeres Mana, hellblau).
Nun kommen wir zu der Lebenanzeige (row1):
Zuerst wird Platz für den Text geschaffen, durch die Erhöhung der Width in column 1 u.2. Die
fertige Lebensanzeige soll so aussehen:

Leben Life/Maxlife

Also setzen wir in column 1 den Text zu "Leben", in column zwei zum String:

"(Life of unit)"+"/"+"(Maxlife of unit)"

Bei der Manaanzeige machen wir das allergleiche (row4)


Aktualisieren des Multiboards

1024_6264393834633337.jpg

In diesem Auslöser werden die Leben der Einheit im Multiboard jede 0.10 Sekunden auf den neusten
Stand gebracht. Dies geschieht durch einen Pereodic-Event. Man könnte auch 0.01 Sekunden wählen,
um das ganze genauer zu machen aber 0.10 reicht auch aus.

Zuerst werden alle Icons in den rows 2 und 4 auf Voll gesetzt. Nun beginnt der kompliziertere Teil
mit den ersten Einsatz der Variablen:

In der Realvariable EinheitLeben[1] wird die Anzahl der Leben pro Icon bestimmt. In
diesem Fall sind 20 Icons (=20 columns) vorhanden für die Darstellung der Leben. Nehmen wir nun an
die Einheit hat 2000 Leben. Das heißt, dass jedem Icon 100 Leben zugewiesen werden.


EinheitLeben[1] = (MaximaleLebenderEinheit)/(Anzahl der Icons)


EinheitLeben[2] wir voerst auf 0.00 gesetzt. Das allergleiche wird dann auch mit EinheitMana[1] und
EinheitMana[2] gemacht.
Den Variablen "Leben" und "Mana" werden die aktuellen Werte der Einheit zugewiesen.

Nun werden die Icons im Multiboard auf den neusten Stand gebracht. Diese Schleife geht von
1 bis (Anzahl der columns). Zuerst wird EinheitLeben[2] um EinheitLeben[1] erhöht, also um
1/20 der Maximalen Leben der Einheit. Im ersten Durchlauf hat EinheitLeben[1] bei 2000 MaxLife den
Wert [coor=red]100[/color].
Danach wird durch eine If-Aktion abgefragt, ob die Aktuellen Leben der Einheit (Variable: Leben)
größer oder gleich EinheitLeben[2] ist. Ist dies der Fall (Die Einheit hat mehr als 100 Leben), so wird
das Icon in column 1 auf volles Leben gesetzt. Wenn nicht, dann auf leeres Leben.
Das allergleiche geschieht auch beim Manateil.
Nehmen wir an, die Einheit hat noch 750 Leben. Bis zum siebten Durchgang wird alles auf volles Leben
gesetzt, da ja Leben bis dahin immer größer als EinheitLeben[2] (=700) bleibt. Im achten Durchgang jedoch
wird das Icon auf leeres Leben gesetzt, da ja nun EinheitLeben[2] (=800) einen größeren Wert als die
Variable Leben hat. Dies geschieht dann auch genauso bis zum 20. Durchgang.

Am Schluss wird noch die Leben- und Manaanzeige (in row 1 u.2) auf den neusten Stand gebracht.


Somit wäre alles geschafft. :)


Wie schon oben erwähnt, lassen sich mit Icons auch andere Sachen als grobe Vierecke darstellen.
Hier ein paar Beispiele:


[.img]Bild folgt....[./img]
Man kann die Icons, wenn man bei Vierecken bleiben will, auch aneinander reihen. Das sieht vielleicht etwas besser
aus und ist mit der width 1.00% möglich.



400_3736663138396465.jpg

Diese Variante erinnert stark an Zelda. Das Icon "volles Leben" ist hier ein großes rotes Herz, das
Icon "leeres Leben" ein kleines Herz. Dank Buster ist der Hintergrund auch transparent. Ich habe die Icons
hier zum Download bereit gestellt:
Volles Herz-http://home.pages.at/shorikon/Grafiken/leben.blp
Leeres Herz-http://home.pages.at/shorikon/Grafiken/lebenblank.blp


400_3663323363333439.jpg

Das Mana kann man auch als Flaschen darstellen. Leider ist diese Grafik (wie es alle meine sind) sehr schlecht
geworden. -_-



Leider hatte ich keine Ideen mehr,
Deßhalb bitte ich euch, eure Varianten hier im Thread vorzustellen.
Würde mich sehr freuen, außerdem würdet Ihr damit auch das Tutorial erweitern und eine extra Nemesis Lob bekommen.:)



Die Beispiel Map gibt hier zum Download:
Beispiel-Map-Download



Plz Feedback!
mfg
Nemesis
 
Level 4
Joined
Nov 22, 2004
Messages
62
damm german

man, u should make these tutorialas ALL in ENGLISH, i know that u made what u can, and we should consider its as a gift. so i beg you for the english translation of these tutorials, that would hel losta people, PLZ?
 
Level 18
Joined
Apr 15, 2004
Messages
1,396
Bad translation.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Live/Manabalken in the Multiboard with Icons

Hello and welcome in this Tutorial for the Warcraft III world-editor!

What does for prerequisites it give? In this Tutorial, one should have already some experiences with the editor. Following reason knowledge are prefaced:
-construction of Multiboards (see in addition the Mutliboard-Tutorial)
-Interactions with variable
-conditions and events
-moreover certainly mathematical knowledge

Why with Icons?
Icons offer one variety. One can select most
deceased Icons, give make forms (through transparency make) and naturally Icons itself to them. Therefore arise an almost unlimited number of ideas that are to be
transferred easily.

Variable first should become following variable generated (your exact sense becomes in later parts of the Tutorials beschieben) :
1024_3663653764663138.jpg


The Multiboard our end-Multiboard so should look:
400_3637613832653937.jpg


Now to the trigger, that generates this Multiboard:
1024_3833616365323335.jpg


First we generate a Multiboard. In this example with 4 rows (row1: Lifenumbers,row2: Lifeicons, ROW3: Mananumbers, ROW4: Manaicons) and 20 colums (all more the more more columns, is the more exact the notice of the life/ the Manas). As next, the Style comes. For row 1 and 3 we determine that only the text is
indicated, for ROW2 u. 4 on the other hand only the Icons. After the widths were adjusted, the Icons are forgiven for ROW2 and ROW4. (Balken/leben.blp = full life dark red; beam/life polished. blp = voids life light red; beam/mana. blp = full Mana, dark blue; beam/manablank. blp = voids Mana, light blue). Now we come to
the life notice (row1) : place first is created for the text, by the increase of the Width in column 1 u. 2. the finished life notice so should look:

Life/Maxlife live

Therefore we set the text to "life" in column 1, in column two to the String:

" (Life of unit)"+"/"+"(Maxlife of unit)"

In the Manaanzeige, we make the allergleiche (row4)

Updating of the Multiboards
1024_6264393834633337.jpg

In this trigger, the life of the unit in the Multiboard is brought each 0.10 seconds on the newest state. This happens through a
Pereodic-Event. One could select passes also 0.01 seconds to make around that entire more exact however 0.10 also from.

First all Icons in the rows 2 become and 4 on full set. Now begins the more complicated part with the first use of the variable:

In the Realvariable unit life [1], the amount of the life is determined per Icon. In this case, 20 Icons ( = 20 columns) are available for the
representation of the life. We take has now 2000 life at the unit. That is that 100 life is shown to each Icon.

Unit life [1] = (MaximaleLebenderEinheit)/(Anzahl of the Icons)

Unit life [2] we voerst on 0.00 set. The allergleiche is made then also with EinheitMana [1] and EinheitMana [2]. And "Mana" the current values of the unit are shown
to the variable "life".

Now the Icons in the Multiboard are brought on the newest state. This bow goes of 1 until (amount of the columns). First unit life [2] is raised by unit life [1], therefore around 1/20 of the maximal life of the unit. In the first conduit, unit life [1] has the value in 2000 MaxLife [coor=red]100[/color]. After that is queried through an
If-action whether the current life of the unit (variable: life) is larger or same unit life [2]. This is the case (the unit has more than 100 life), the Icon in column 1 is set on full life. If not, then on empty life. The allergleiche happens also in the Manateil. We suppose still has, the unit 750 life. To the seventh run, all is set on
full life because yes life remains until there always larger than a unit life [2] (=700). In the eighth run however the Icon is set on empty life because now unit life [2] (=800 has) a larger value than the variable life. This happens then also just as to the 20th run.

At the end, yet the life and Manaanzeige (in row 1 u. 2) is brought on the newest state.

Therefore everything would be created. icon_smile. gif

How already above mentioned, can be represented with Icons also other things as coarse rectangles. Here a couple of example:

[.img]Bild folgt....[./img] one the Icons can if one wants to remain in rectangles, also line up to each other. That looks perhaps somewhat better and is 1,00% possible
with the width.

400_3736663138396465.jpg

This variant reminds strongly of Zelda. Life" "full the Icon is here a large red heart, the Icon "empty life" a little heart. Thanks to Buster, the
background is also transparent. I placed the Icons here to the download ready: full Herz-http://home.pages.at/shorikon/Grafiken/leben.blp voids
Herz-http://home.pages.at/shorikon/Grafiken/lebenblank.blp


400_3663323363333439.jpg

One can represent the Mana also as bottles. Unfortunately this graphics (like it everyone mine is) became very bad. -_-



Unfortunately I had no more more ideas, Deßhalb please I you to introduce your variants here in the Thread. Very would please would expand me, moreover your therewith also the Tutorial and got an extra nemesis praise. icon_smile. gif



The examples Map gives here to the download: Beispiel-Map-Download



Plz feedback! mfg nemesis
 
Top