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
 

LightChaosma

New Member
Reaction score
60
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
 

titusthefox

New Member
Reaction score
0
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
 

Komaqtion

You can change this now in User CP.
Reaction score
469
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 :(
 

titusthefox

New Member
Reaction score
0
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
 

Komaqtion

You can change this now in User CP.
Reaction score
469
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 =(
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
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.
 

LightChaosma

New Member
Reaction score
60
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)
 

titusthefox

New Member
Reaction score
0
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
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
Off topic: better don't double post, use the edit function instead.
 

titusthefox

New Member
Reaction score
0
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?
 

LightChaosma

New Member
Reaction score
60
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
 

titusthefox

New Member
Reaction score
0
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
 

LightChaosma

New Member
Reaction score
60
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 ;)
 

titusthefox

New Member
Reaction score
0
((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 :)
 

titusthefox

New Member
Reaction score
0
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?
 

LightChaosma

New Member
Reaction score
60
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)
 

titusthefox

New Member
Reaction score
0
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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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