i belive this is what you want
- test
- Events
- Unit - A unit Begins construction
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Triggering unit) has an item of type Tome of Experience) Equal to True
- (Region 000 <gen> contains (Triggering unit)) Equal to True
- Then - Actions
- Else - Actions
- Unit - Remove (Constructing structure) from the game
i belive this is what you want
- Problem
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Region 000 <gen> contains (Triggering unit)) Equal to True
A region can not contain a unit. A region can contain a location which refers to the position of a unit however.
This basicaly means the same thing, but there is no native to do it directly.
You can, just you will eithor need to test if the Unit's X/Y positional vectors are in the region or you will need to create a location, check if that location is in the region and then free that location.
Fack, that's so complicated... : /
Not really.
- Set Point = Position of (triggering unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Your region <gen> contains (Point)) Equal to True
- Then - Actions
- ------- Your actions -------
- Custom script: call RemoveLocation(udg_Point)
Post the trigger.
I believe Meticulous is posting a trigger with variable, maybe you don't know that yet. The variable can be access by the x icon in the trigger editor
What is not working... You keep referencing somethiing without showing us what and in what way. Without more detail we can not help you.
1. Post piece of script (eithor GUI or JASS).
2. Post fault description (syntax error, logical fault etc).
Then we can help you.
Ok, I'm sorry, I'll post it now....
- Events
- Unit - A unit Begins construction
- Conditions
- Actions
- Set Posicao = (Position of (triggering unit))
- If (All conditions are true) then do (then actions) else do (else actions)
- If - Conditions
- ((triggering unit) has an item of type Key01) equal to true
- (Region120<gen> contains Posicao) equal to true
- Then - Actions
- Do nothing
- Else - Actions
- Unit - Remove (constructing structure) from the game
Sorry, "Triggering unit" for this event refers to the building being constructed, not the unit constructing it. I should've caught that sooner, my bad. You'll have to use "Issued order" for this, and it'll require 2 triggers.
The above trigger sets a Boolean variable to true or false to decide whether the player is allowed to build or not. It's an array so that you can have a different value for every player, in case one player has the key and another doesn't (just assuming it's a multiplayer map). Set the size of the array to the number of players in the game.
- Trigger1
- Events
- Unit - A unit Is issued an order targeting a point
- Conditions
- (Issued order) Equal to (Order(farm))
- Actions
- Set point = Target point of issued order
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Triggering unit) has an item of type Key) Equal to True
- (Your region <gen> contains (point)) Equal to True
- Then - Actions
- Set BuildOn[(Player number of (Owner of (Triggering unit)))] = True
- Else - Actions
- Set BuildOn[(Player number of (Owner of (Triggering unit)))] = False
This trigger removes the building if the player isn't allowed to build it.
- Trigger2
- Events
- Unit - A unit Begins construction
- Conditions
- BuildOn[(Player number of (Owner of (Triggering unit)))] Equal to False
- Actions
- Unit - Remove (Triggering unit) from the game
Keep in mind if your unit is an Orc or Night Elf builder, they will be stuck hidden if a building they're building is removed. You can circumvent this by first killing and then removing the building.
I'm having a big problem to find these triggers, I mean this's Farm or Build ?
And which variable is that
- Conditions
- (Issued order) Equal to (Order(farm))
It's point variable right ? But I didnt find any "Target point of issued order"
- Set point = Target point of issued order
That is called a syntax error, the parser says that piece of script does not make sense. You will need to change it so your script obeys the rules of the JASS scripting language inorder for the map to run.And when I gonna save it gives a error " call RemoveLocation(udg_Point)"
hbadotti, I advise skipping straight to scripting instead of trying to use GUI. GUI is very illogical so you may find the script easier to use in your case.
That is called a syntax error, the parser says that piece of script does not make sense. You will need to change it so your script obeys the rules of the JASS scripting language inorder for the map to run.
Which variable is buildon ???
- Conditions
- BuildOn[(Player number of (Owner of (Triggering unit)))] Equal to False
And wich function is that ?
------------------------
And when I gonna save it gives a error " call RemoveLocation(udg_Point)"
BuildOn is a Boolean variable, and the condition is a Boolean comparison.
Replace "Point" with whatever you named your point variable. udg_Whatever. Remember capitalization matters.
OK,
Replace "Point" with whatever you named your point variable. udg_Whatever. Remember capitalization matters. DONE
BuildOn is a Boolean variable. DONE
and the condition is a Boolean comparison. PROBLEM ! >>>>> So I found the Boolean comparison but the command "Player number of" is just for intergers what can I do now ?
- Conditions
- BuildOn[(Player number of (Owner of (Triggering unit)))] Equal to False