HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hard dialoge problem

10-04-2004, 10:06 AM#1
Arohk
im working on a dialoge system to buy and sell a house but i the dialoge always mess up.
Code:
Sellhouse1info
    Ereignisse
        Einheit - A unit Startet den Effekt einer Fähigkeit
    Bedingungen
        (Ability being cast) Gleich Talk Talk
        (Target unit of ability being cast) Gleich ? 0219 <gen>
    Aktionen
        Set SellHouseused[1] = True
        Dialog - Change the title of SellHousedialoge[1] to Information
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            'IF'-Bedingungen
                SellHouseowner[1] Gleich 0
            'THEN'-Aktionen
                Dialog - Create a dialog button for SellHousedialoge[1] labelled Buy House (- 200 go...
                Set SellHouseBuy[1] = (Last created dialog Button)
                Dialog - Create a dialog button for SellHousedialoge[1] labelled |cffff0000X|r
                Set SellHouseNothing[1] = (Last created dialog Button)
                Dialog - Zeigen SellHousedialoge[1] for (Owner of (Casting unit))
                Skip remaining actions
            'ELSE'-Aktionen
                Dialog - Create a dialog button for SellHousedialoge[1] labelled Enter House
                Set SellHouseEnter[1] = (Last created dialog Button)
                Dialog - Create a dialog button for SellHousedialoge[1] labelled Sell House (+150 go...
                Set SellHouseSell[1] = (Last created dialog Button)
                Dialog - Create a dialog button for SellHousedialoge[1] labelled |cffff0000X|r
                Set SellHouseNothing[1] = (Last created dialog Button)
                Dialog - Zeigen SellHousedialoge[1] for (Owner of (Casting unit))
                Skip remaining actions

this create the dialoge when you talk whit a unit and dont have the house,
it look like that

Information:

Buy House (-200 gold)

X


ok so far,
when i click on the X it run this trigger
Code:
Sellhouse1nothing
    Ereignisse
        Dialog - A dialog button is clicked for SellHousedialoge[1]
    Bedingungen
        (Clicked dialog button) Gleich SellHouseNothing[1]
    Aktionen
        Dialog - Clear SellHousedialoge[1]
        Dialog - Verbergen SellHousedialoge[1] for (Triggering player)
        

BUT here it mess up, it run ALL dialoge actions ( BUY the house, Sell the House, Enter the House and X)
the same happens when i click on buy the house, it always run all dialoge actions.

The problem must be in the IF/THEN/ELSE but i dont find it
10-04-2004, 01:45 PM#2
Dead-Inside
First of all, that german really messes my logic up, it's a great distraction.

Secondly, why are you using an array? And if you're supposed to, why are you using *1* instead of "Player number of owner of casting unit"?
10-04-2004, 03:22 PM#3
Arohk
K
i tried around whit it and found the bug,
i had to clear the dialoge before i create it