Trigger don't work

denmax

You can change this now in User CP.
Reaction score
155
Your Flaw: Event - SELLS A UNIT

Okay... You have that one.
 

ShinyStar47

New Member
Reaction score
3
if i do that i get this:
8y966r.png
 

Sooda

Diversity enchants
Reaction score
318
This is what you want:
Code:
Player Start Building
    Events
        Unit - A unit Pawns an item (to shop)
    Conditions
    Actions
        Unit - Create 1 Town Hall for (Owner of (Triggering unit)) at ((Owner of (Triggering unit)) start location) facing Default building facing degrees
There is much to learn about World Editor, check links in my signature.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Event:
- A unit acquires an item
Conditions:
- Item-type of (Item being manipulated) equal to <your item>
Actions:
- Unit - Create 1 <some unit> for (Owner of (Triggering unit)) at Start location of (Owner of (Triggering unit)) facing Default
- Visibility - Create an ... modifier ... for (Owner of (Triggering unit)) at <region 2>
- Unit - Remove (Triggering unit) from the game
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
"It doesn't work" is not a very good problem description.

Problems with triggers are best helped with by posting said triggers.
You can right-click the trigger's name (in the trigger view), use "copy as text" and paste it here.
 

ShinyStar47

New Member
Reaction score
3
here it is:
Code:
Orc Race
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Orc Race/Blood Orc Race/Demon Race
    Actions
        Item - Remove (Item being manipulated)
        Unit - Create 1 CreepCreator (Orc level 1) for (Owner of (Triggering unit)) at ((Owner of (Triggering unit)) start location) facing Default building facing (270.0) degrees
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Buying unit)) Equal to Player 1 (Red)
            Then - Actions
                Unit - Remove Race Chooser 0025 <gen> from the game
                Visibility - Create an initially Disabled visibility modifier for Player 1 (Red) emitting Visibility across Disabled Visibility 2 <gen>
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Selling unit)) Equal to Player 2 (Blue)
                    Then - Actions
                        Unit - Remove Race Chooser 0026 <gen> from the game
                        Visibility - Create an initially Disabled visibility modifier for Player 2 (Blue) emitting Visibility across Disabled Visibility 2 <gen>
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Owner of (Selling unit)) Equal to Player 3 (Teal)
                            Then - Actions
                                Unit - Remove Race Chooser 0029 <gen> from the game
                                Visibility - Create an initially Disabled visibility modifier for Player 3 (Teal) emitting Visibility across Disabled Visibility 2 <gen>
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Owner of (Selling unit)) Equal to Player 4 (Purple)
                                    Then - Actions
                                        Unit - Remove Race Chooser 0021 <gen> from the game
                                        Visibility - Create an initially Disabled visibility modifier for Player 4 (Purple) emitting Visibility across Disabled Visibility 2 <gen>
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Owner of (Selling unit)) Equal to Player 5 (Yellow)
                                            Then - Actions
                                                Unit - Remove Race Chooser 0024 <gen> from the game
                                                Visibility - Create an initially Disabled visibility modifier for Player 5 (Yellow) emitting Visibility across Disabled Visibility 2 <gen>
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Owner of (Selling unit)) Equal to Player 6 (Orange)
                                                    Then - Actions
                                                        Unit - Remove Race Chooser 0027 <gen> from the game
                                                        Visibility - Create an initially Disabled visibility modifier for Player 6 (Orange) emitting Visibility across Disabled Visibility 2 <gen>
                                                    Else - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                (Owner of (Selling unit)) Equal to Player 7 (Green)
                                                            Then - Actions
                                                                Unit - Remove Race Chooser 0023 <gen> from the game
                                                                Visibility - Create an initially Disabled visibility modifier for Player 7 (Green) emitting Visibility across Disabled Visibility 2 <gen>
                                                            Else - Actions
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    If - Conditions
                                                                        (Owner of (Selling unit)) Equal to Player 8 (Pink)
                                                                    Then - Actions
                                                                        Unit - Remove Race Chooser 0022 <gen> from the game
                                                                        Visibility - Create an initially Disabled visibility modifier for Player 8 (Pink) emitting Visibility across Disabled Visibility 2 <gen>
                                                                    Else - Actions
                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                            If - Conditions
                                                                                (Owner of (Selling unit)) Equal to Player 9 (Gray)
                                                                            Then - Actions
                                                                                Unit - Remove Race Chooser 0030 <gen> from the game
                                                                                Visibility - Create an initially Disabled visibility modifier for Player 9 (Gray) emitting Visibility across Disabled Visibility 2 <gen>
                                                                            Else - Actions
                                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                    If - Conditions
                                                                                        (Owner of (Selling unit)) Equal to Player 10 (Light Blue)
                                                                                    Then - Actions
                                                                                        Unit - Remove Race Chooser 0028 <gen> from the game
                                                                                        Visibility - Create an initially Disabled visibility modifier for Player 10 (Light Blue) emitting Visibility across Disabled Visibility 2 <gen>
                                                                                    Else - Actions
                                                                                        Do nothing
Thats the one for the orc race i have one for the humans night elf and the undead to if you wanna see that say it.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
This "race chooser" is the unit that buys the item?
If yes, just remove the Triggering unit" and forget that "if then else if then ...".

The Selling Unit is probably not owned by a normal player anyway...
 

ShinyStar47

New Member
Reaction score
3
14aleo9.png

The circle is the race chooser and the wisp is the unit where you buy the item with.

PS: wisp has unit inventory
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
I am a little surprised others didn't notice yet, but you want to use owner of unit manepulating item, not owner of triigering unit, cause it is a item triggering it, not a unit.



Orc Race
Events
Unit - A unit Acquires an item

Conditions
(Item-type of (Item being manipulated)) Equal to Orc Race/Blood Orc Race/Demon Race

Actions
Item - Remove (Item being manipulated)

Unit - Create 1 CreepCreator (Orc level 1) for (Owner of (Item being manipulated)) at ((Owner of (Item being manipulated)) start location) facing Default building facing (270.0) degrees
 

ShinyStar47

New Member
Reaction score
3
I am a little surprised others didn't notice yet, but you want to use owner of unit manepulating item, not owner of triigering unit, cause it is a item triggering it, not a unit.



Orc Race
Events
Unit - A unit Acquires an item

Conditions
(Item-type of (Item being manipulated)) Equal to Orc Race/Blood Orc Race/Demon Race

Actions
Item - Remove (Item being manipulated)

Unit - Create 1 CreepCreator (Orc level 1) for (Owner of (Item being manipulated)) at ((Owner of (Item being manipulated)) start location) facing Default building facing (270.0) degrees

if i do that this happen: buy the item and nothing happens

maybe i should make a unit called orc race and do this:
Code:
Orc Race
    Events
        Unit - A unit enters Disabled Visibility 2 <gen>
    Conditions
        (Unit-type of (Entering unit)) Equal to Orc Race
    Actions
        Unit - Remove (Entering unit) from the game
        Unit - Create 1 CreepCreator (Orc level 1) for (Owner of (Entering unit)) at ((Owner of (Entering unit)) start location) facing Default building facing (270.0) degrees

EDIT: IT WORKS with a unit ^_^
Thanks for everyones (did i spelled that right) help

EDIT2: Human orc undead and night Elf work only Random not
 

ShinyStar47

New Member
Reaction score
3
I have a new question it's about the same map.
i have very much place to do something but i don't know know what to do
This is map:
k1wf4j.png


Info: the map is a little like Custom Hero Line Wars (CHLW)
the left is for creating a hero and the right for the line
dont tell me to create another line because i don't do that.

Someone?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top