• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Create your own Hero system - problems

Status
Not open for further replies.
Level 3
Joined
Jun 30, 2008
Messages
26
So I´ll hope someone can help me

At first I have to say my english is not very good so I´ll hope some people understand me and find a solution for my problem.

My idea is to create your own hero in my map with a dailog buttons.
You can choose your race, attribute, type of battle (range/melee) and dynasty (male/female).

And I dont know how I get the new created hero if I choosed all options.
I have no ideas to solve my problem.

I hope the people unterstand me and can help me now.

hero pricking.jpg
 
Level 24
Joined
Feb 28, 2007
Messages
3,479
Your going to have to use variables, and lots of them. First have a variable Called HeroRace or similar which is an Integer, where 0 = Human and 1 = Undead. Then you make an integer for each option where in gender 0 = male 1 = female and so on for all chooses. Then when all choises are made you do a IF/THEN/ELSE that check the race, then you just put the new IF/THEN/ELSES in each other until finally you've checked all players choises and can create the unit.
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
uhmm shall be easy.. you make an event which fires when your LAST dialog button has been clicked, letz name it Dialog_Gender
  • Events
    • Dialog - A dialog button is clicked for Dialog_Gender
  • Conditions
  • Actions
    • If (clicked dialog button) equal to Female then do Unit - Create 1 Female_Hero for Player x at point x else do nothing
    • If (clicked dialog button) equal to Male then do Unit - Create 1 Male_Hero for Player x at point x else do nothing
Well it's clear that you have to set a variable for each dialog and of course for each dialog button to make them referrable. The above trigger shall give you the basic idea but if you want me to do t for you, send me a pm containing the map and your wishes (can be in german ;) )
 
Level 3
Joined
Jun 25, 2008
Messages
65
Ja kann ich gern ;)
Also Ich erkläre dir das mal für eine neinzigen Spieler, du musst das ganze separat für jeden Spieler machen, für jeden die Variablen anlegen usw....

Als erstes erstellst du folgende Variablen (Name / VarType)
Hero_Type_Red Integer
Gender_Red Integer
Main_Att _Red Integer
Me_Ra_Red Integer
Type_of_Battle_Red Integer

Nun fängst du mit Auslösern an:
Als erstes machst du den Dialog-Button für das Geschlecht.
Dann brauchst du nen Auslöser der als Ereignis "Knopf gedrückt" hat.

Dann machst du ne if-Verzweigung:
If "Männlich" gedrückt, dann setze "Gender_Red" = 0,
else, setze "Gender_Red" = 1.

So machst du das mit den anderen auch, also nen Dialog-Button für Main_Att_Red
und dann wieder ne if-Verzweigung:
If "Intelligence" gedrückt, dann setze "Main_Att_Red" = 0,
Else If "Agility" .... =1
Else If "Strength" ... = 2

usw.... ( Kriegst das schon hin)

Dann zum Schluss machst du den Helden nach dem Schema:
Dein System ist ein bissel doof, weil du ziemlich viele Helden brauchst.^^
Für jeden Fall einen eben... Also erstellst du dir erstmal die Helden
(12 * Anzahl Heldentypen * Anzahl Battletypen)

Und dann geht das so ;)
Ereignis
Dialog Button geklickt (Der letzte in der Reihe der Auswahlkriterien)

Bedingung
<Leer>

Aktion
If Gender_Red = 0, then
If Hero_Type_Red = 0, then
If Main_Att_Red = 0, then
If Me_Ra_Red = 0, then
{
If Type_of_Battle_Red = 0, then

Create (Hero) for (Player Red) at XX facing ...
Else If Type_of_Battle_Red = 1, then
Create (Hero) for ....
Else If Type_of_Battle_Red = 2, then
Create (Hero) for ....
}
Else If Me_Ra_Red = 1, then
{
If Type_of_Battle_Red = 0, then
Create (Hero) for (Player Red) at XX facing ...
Else If Type_of_Battle_Red = 1, then
Create (Hero) for ....
Else If Type_of_Battle_Red = 2, then
Create (Hero) for ....
}
.......

Wird sehr langer Auslöser, der letzte hier =)


Ist sehr unübersichtlich, aber hab kein Wc3 hier aufm Rechner... Hier ist Vista drauf und das muss Ich erst von meinem anderen rüberziehen, installieren kann ich es auf Vista nicht :/ Sonst hätt ich dir ne getriggerte Version geschickt.

Das wird wirklich lang, aber die kurze Variante wäre schwerer zu erklären gewesen, du brauchst das nicht unbedingt für jeden einzeln zu machen, sondern kannst auch mit Arrays arbeiten, aber das wird schwerer =)
 
Last edited:
  • Angry
Reactions: Rui
Level 3
Joined
Jun 25, 2008
Messages
65
Yes , lol
But if here are more Germans they could read it and dont have to make a new Post...
I'll make it in Trigger Editor and post it again ;)
My TE is in English, too^^
 
Level 2
Joined
Jun 30, 2008
Messages
14
Hmm, I used to use a quite similar system for heroes. However I used circle of powers and different types of options to go. This should not be a hard.

Start the Dialogs by first selecting your race, and then your gender. By selecting this, you have to have all the pre-made models of your races ready. As the above told you, set the genders and races with different variables:

Variable Name | Variable Type | Initial Value

unit_class | Integer | xy (depends on how much classes you have 0-xy)
unit_race | Integer | xy (depends on how much races you have 0-xy)
unit_gender | Integer | 1 (0 is female / 1 is male)


After you have created these variables, then you will have to set the appropriate variables to the appropriate values a you are clicking the dialog buttons:

Let's name the dialogs :
Race : Dialog_Race
Gender : Dialog_Gender
Class : Dialog_Class
Primary Attribute: Dialog_PrimAtr

Race
  • Events
    • Dialog - A dialog button is clicked for Dialog_Race
  • Conditions
    • (Clicked dialog button) Equal to (Human) - for example
  • Actions
    • Set unit_race = 0
Gender:
  • Events
    • Dialog - A dialog button is clicked for Dialog_Gender
  • Conditions
    • (Clicked dialog button) Equal to (Female) - for example
  • Actions
    • Set unit_gender = 0
Class:
  • Events
    • Dialog - A dialog button is clicked for Dialog_Class
  • Conditions
    • (Clicked dialog button) Equal to (Ranged) - for example
  • Actions
    • Set unit_class = 0
Primary Attribute (this is just an example, you can modify the numbers/selections as you wish:
  • Events
    • Dialog - A dialog button is clicked for Dialog_PrimAtribute
  • Conditions
    • (Clicked dialog button) Equal to (Str) - for example
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • unit_race Equal to 0
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • unit_race Equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • unit_type Equal to 0
            • Then - Actions
              • Unit - Create 1 Human_Female_Ranged for Player Xy (color) at (Xy) facing Xy
              • Hero - Modify Strength of (Last created unit): Set to 10
              • Hero - Modify Intelligence of (Last created unit): Set to 20
              • Hero - Modify Agility of (Last created unit): Set to 30
            • Else - Actions
              • comes here if you do different options
        • Else - Actions
          • comes here if you do different options
    • Else - Actions
      • comes here if you do different options



I hope I helped. :)
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Yes , lol
But if here are more Germans they could read it and dont have to make a new Post...
Since we don't know if there are more Germans here, you have to post in English, and nobody is forced to go look for a German dictionary just to understand what you or any other German are saying.
That is what happens when you skip the Rules.

EDIT: Be careful with those "neutralizations".
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
its just a combination od dialogs and variables, there are tutorials on both of them, the rest is brain work to put them together until it fits, its also hard to make a tutorial because you can hardly generalize it, if you want a system like that, tell me i did the one for Avail

PS: maybe make a new thread then
 
Status
Not open for further replies.
Top