WAR3 Editor, need help with triggers

titusthefox

New Member
Reaction score
0
Hey all,

I am playing around with making maps and a campaign and i've hit a snag. I am sure the answer to it is very easy, but for some reason it has eluded me with ease :p

Here's the thing:
I want a trigger that spawns creatures for me when the player has built 1 town hall and 6 farms.

Any suggestions? And please, if you can - do it step by step for me :p

Thanks for any respons :)

-Titus
 
Code:
Untitled Trigger 002
    Events
        Unit - A unit Finishes construction
    Conditions
        ((Unit-type of (Constructed structure)) Equal to Town Hall) or ((Unit-type of (Constructed structure)) Equal to Farm)
        (Number of units in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Farm) and ((Owner of (Matching unit)) Equal to (Triggering player))))) Equal to 6
        (Number of units in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Town Hall) and ((Owner of (Matching unit)) Equal to (Triggering player))))) Equal to 1
    Actions
        Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees

hope this is what you'r looking for
 
Aye

Aye, it sure is :) But I am having problems finding each different code, could you maybe tell me where to go for each code? :p Sorry for my lack of skills :D
 
first 1 is for the first and or condition, and also a boolean condition i think
second and third is both integer conditions, sorry but don't have time explain more :(
 
Alliance reinforcement
Events
Unit - A unit owned by Player 10 (Light Blue) Finishes construction
Conditions
(Unit-type of (Constructed structure)) Equal to Farm
(Unit-type of (Constructed structure)) Equal to Town Hall
Actions
Unit - Create 1 Squire Kalahn for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))
Unit - Create 11 Footman for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))

This is what I have so far. Not sure how you got the "Or" in the first condition, do I need it or does it work like I've set it up thus far?

And then there's those two other conditions, those I can't find :D
 
you use or when you want the condition to be either 1 or the other, and conditions means that both have got to be true. you can find or bu clicking "o" when you have up the condition menu then there will be two red texts "Condition 1" and "Condition 2" click 1 and put 1 of your unit type conditions there and then put the other condition in the other text.
for the Number of units condition you will press "i" when in the condition menu, then you will come to the integers, it will already say this: (Number of units in (Units in (Playable map area)) of just cjange the Units in to Units owned by Player 10 blue of type and then put your building there

EDIT: Sorry for the long post and sorry if you still don't get it, im not that good at explaining =(
 
ok.
Open your Trigger Editor (F4) -> Make a new Condition (Ctrl + D) -> Scroll down to Or (one of the last possibilitys) -> If you click it you can enter 2 other conditions (You did them already, i think you ll get it)

Next one:
Create a condition (Ctrl + D) -> Scroll down to Integer Comparison -> Change the left value to Unit - Count units in unit group (I think it is even standart in integer comparison) -> Now change Units in rect to Units in rect matching condition -> set the condition of the unit to Unit-type of (matching Unit) equal to Farm

And for the townhall, repeat the second condition with unit type townhall instead of farm and a value of 1 exept 6.
 
the or command is one of th last condition options, with that option you can just enter the 2 condtions you have(these are correct).
the other 2 conditions (the counters) are integer coditions, just change what he needs to count to unit in region matching.....

P.S. the and condition used in the integer conditions is also located in the last few conditions (bottom of the list)
 
Ugh, I have to be honest with you and admit I don't understand you :p I'm sorry, but english is not one of my native languages so I can't interpeid different variations of it very well :| Thanks for trying though :)

(Number of units in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Farm) and ((Owner of (Matching unit)) Equal to (Triggering player))))) Equal to 6
(Number of units in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Town Hall) and ((Owner of (Matching unit)) Equal to (Triggering player))))) Equal to 1

Those are the two conditions I need to know how to make :p
 
Off topic: better don't double post, use the edit function instead.
 
Arg, no units appeared :| pretty sure I got it right.

Alliance reinforcement
Events
Unit - A unit owned by Player 10 (Light Blue) Finishes construction
Conditions
(Unit-type of (Constructed structure)) Equal to Farm
(Unit-type of (Constructed structure)) Equal to Town Hall
(Number of units in (Units in Build farms1 <gen> matching ((Unit-type of (Triggering unit)) Equal to Town Hall))) Equal to 1
(Number of units in (Units in Build farms1 <gen> matching ((Unit-type of (Triggering unit)) Equal to Farm))) Equal to 6
Actions
Unit - Create 1 Squire Kalahn for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))
Unit - Create 11 Footman for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))


Still, no units appeared, any ideas?
 
Arg, no units appeared :| pretty sure I got it right.

Alliance reinforcement
Events
Unit - A unit owned by Player 10 (Light Blue) Finishes construction
Conditions
(Unit-type of (Constructed structure)) Equal to Farm
(Unit-type of (Constructed structure)) Equal to Town Hall
(Number of units in (Units in Build farms1 <gen> matching ((Unit-type of (Triggering unit)) Equal to Town Hall))) Equal to 1
(Number of units in (Units in Build farms1 <gen> matching ((Unit-type of (Triggering unit)) Equal to Farm))) Equal to 6
Actions
Unit - Create 1 Squire Kalahn for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))
Unit - Create 11 Footman for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))


Still, no units appeared, any ideas?

you forgot tyhe or command:)
(Unit-type of (Constructed structure)) Equal to Farm
(Unit-type of (Constructed structure)) Equal to Town Hall
needs to be
(Unit-type of (Constructed structure)) Equal to Farm or(Unit-type of (Constructed structure)) Equal to Town Hall
 
Alliance reinforcement
Events
Unit - A unit owned by Player 10 (Light Blue) Finishes construction
Conditions
((Unit-type of (Triggering unit)) Equal to Farm) or ((Unit-type of (Triggering unit)) Equal to Town Hall)
(Number of units in (Units in Build farms1 <gen> matching ((Unit-type of (Triggering unit)) Equal to Town Hall))) Equal to 1
(Number of units in (Units in Build farms1 <gen> matching ((Unit-type of (Triggering unit)) Equal to Farm))) Equal to 6
Actions
Unit - Create 1 Squire Kalahn for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))
Unit - Create 11 Footman for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))

Did I get it right this time? :p
 
nope, i overlooked a few things i'll make the changes fat:

Code:
Alliance reinforcement
    Events
        Unit - A unit owned by Player 10 (Light Blue) Finishes construction
    Conditions
        ((Unit-type of [U]([B]constructed unit[/B])) [/U]Equal to Farm) or ((Unit-type of ([U][B]constructed unit[/B])) [/U]Equal to Town Hall)
        (Number of units in (Units in Build farms1 <gen> matching ((Unit-type of[U] ([B]matching unit[/B])) [/U]Equal to Town Hall))) Equal to 1
        (Number of units in (Units in Build farms1 <gen> matching ((Unit-type of [U]([B]matching unit[/B]))[/U] Equal to Farm))) Equal to 6
    Actions
        Unit - Create 1 Squire Kalahn for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))
        Unit - Create 11 Footman for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))

sry for any misspelling, english is not my native language either

P.S. if you want to check wether the fault it in the actions or in the conditions, add an action in the begin of you trigger to display some text, maybe usefull for some more complex triggers in the future ;)
 
((Unit-type of (constructed unit)) Equal to Farm) or ((Unit-type of (constructed unit)) Equal to Town Hall)

I can't fint (constructed unit)) , is it maybe supposed to be constructed structure?


...Yay, page 2 ftw :)
 
Okey, I got them to spawn, but here's a new problem :p They spawned x3 times :p

My triggers thus far:

Alliance reinforcement
Events
Unit - A unit owned by Player 10 (Light Blue) Finishes construction
Conditions
((Unit-type of (Constructed structure)) Equal to Farm) or ((Unit-type of (Constructed structure)) Equal to Town Hall)
(Number of units in (Units in Build farms1 <gen> matching ((Unit-type of (Matching unit)) Equal to Town Hall))) Equal to 1
(Number of units in (Units in Build farms1 <gen> matching ((Unit-type of (Matching unit)) Equal to Farm))) Equal to 6
Actions
Unit - Create 1 Squire Kalahn for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))
Unit - Create 11 Footman for Player 10 (Light Blue) at (Center of Alliance reinforcement <gen>) facing (Random point in (Playable map area))

I'm thinking they maybe spawned once for each condition?
 
that would mean the trigger fires 3 times for some reason, wich is strange, since you only have he event once...A solution would be, dont get me wrong, this is probalbly the lamest way to fix the problem, is to add an action at the end of the trigger to destroy this trigger or so...

but i son't see any faults in the code, don't you have the same trigger running or so?

EDIT:
Code:
Trigger - Turn off (This trigger)
 
The end trigger did the job :)

It seems though that it didn't require the town hall to be completed to trigger itself - the units spawned as soon as the 6 farms where done and the town hall wasn't even finished yet :p maybe it should be "and" instead of "or" if thats even possible? :p anyhu, I can live with this :)

Thanks for all the support and help! Awesome community :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    It is weird seeing a way more realistic users online number
  • The Helper The Helper:
    Happy Tuesday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top