• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Just a building

Status
Not open for further replies.
Level 2
Joined
May 19, 2013
Messages
8
hello!
what i should do if i would like to get a custom starter building and no units at the starting location plus where i can find the amount the starting gold and lumber?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
hello!
what i should do if i would like to get a custom starter building and no units at the starting location plus where i can find the amount the starting gold and lumber?

All this is done with triggers.

  • Stuff
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer LoopIntA) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Race of Player(LoopIntA)) Equal to Human
            • Then - Actions
              • Unit - Create 1 Custom Town Hall for Player(LoopIntA) at (Player(LoopIntA) start location) facing Default building facing degrees
              • Player - Set Player(LoopIntA) Current gold to 750
              • Player - Set Player(LoopIntA) Current lumber to 750
            • Else - Actions
LoopIntA is an integer variable that you have to create yourself in variable editor.
 
Level 2
Joined
May 19, 2013
Messages
8
i cant get the condition part... can i get step to step pictures?
 

Attachments

  • wc3.png
    wc3.png
    10.9 KB · Views: 88
Level 13
Joined
Mar 24, 2013
Messages
1,105
Use Trigger tags, it makes seeing what you have much easier!

I believe your problem is that you seem to have a variable named "PlayerLoopIntA" that's not what Xonok meant.

What they want is for you to go to the action called
-
  • For each (Integer BLANK) from 1 to 12, do (Actions)
    • Loop - Actions
BLANK should be a variable named LoopIntA of type Integer

-Next
Xonok is saying use an ITE statement to do a Race comparison
-Click on the blue "Race of Player 1 (Red)"
-Click on the blue "Player 1 (Red)"
-Click Function, scroll and find "Conversion - Convert Player Index To Player"
-Click on the blue "1"
-Select the LoopIntA variable you made prior

And now everything should be the same as Xonok had it!
(Be sure to change the create unit with the proper Player(LoopIntA))
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
It's only 12 leaks, which is soo minor in the long term, but okay.
If it creates 12 town halls, then you forgot to change who the town hall is created for.
I also added another condition so it wouldn't in any case create town halls for unused slots.

  • Stuff
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer LoopIntA) from 1 to 12, do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Race of (Player(LoopIntA))) Equal to (==) Human
              • ((Player(LoopIntA)) slot status) Not equal to (!=) Is unused
            • Then - Actions
              • Set TempPointA = ((Player(LoopIntA)) start location)
              • Unit - Create 1 Town Hall for (Player(LoopIntA)) at TempPointA facing Default building facing (270.0) degrees
              • Custom script: call RemoveLocation(udg_TempPointA)
            • Else - Actions
 
Level 2
Joined
May 19, 2013
Messages
8
i tried out something and its working well actually check it pls
but i guess im going to have problems with the night elves and undead because of their mines...
 

Attachments

  • wc33.png
    wc33.png
    10.4 KB · Views: 136
Level 21
Joined
Mar 27, 2012
Messages
3,232
i tried out something and its working well actually check it pls
but i guess im going to have problems with the night elves and undead because of their mines...

You can also do it this way, but using a loop is generally easier.
What a loop does is that it simply repeats an action for a few times, so you wouldn't have to do things 12 times in a row.

Agreed, it's more complicated with nightelves and undead. I could show you if you wish.

Btw, you can post triggers much easier by just rightclicking the trigger name inside the trigger (The thing that was highlighted in your last pic)
and then selecting "Copy as text".
Then you just paste it into your post and put trigger tags around it.
Trigger tags are those:
[TRIGGER]Your trigger code here[/TRIGGER]
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
there is a trigger for haunting gold mines but there isnt any for entangling gold mines. what i suggest is that you create a custom version of the entangled gold mine that is quick to build that you trigger, then disable afterwards. i could create it for you and then post the trigger if you want. the system for custom start i can also create because i use it myself.(at least i did once.) i am very patient when it comes to helping people.
 
Status
Not open for further replies.
Top