• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Several Questions

Status
Not open for further replies.
Level 1
Joined
Jul 27, 2010
Messages
4
Hello, I am trying to make a form of building that has to be built on a special type of ground, (example grass) and when built it start producing a form of income, (Wood in my case) how do you do that?
Also I am wondering how to Change Good name (example wood become Wood and Metal) and how do you change The name of a Race? :S
Thanks for all help =)
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
For the income, you'll need an integer variable.

Each time a player finishes building an income building, add 1 to his counter (''IncomeCounterRed'', for example).

Trigger:
Events: Time - Every X seconds of game time
Actions: Player - Add X amount * ''IncomeCounterRed'' to Player 1 (Red) Current gold/wood

Changing names and stats: Advanced > Game Interface and Gameplay Constants.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here's how to build only on specific terrain type. You can only build on dirt.


  • Untitled Trigger 015
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (Order(farm))
    • Actions
      • Set point1 = (Target point of issued order)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at point1) Equal to Lordaeron Summer - Dirt
        • Then - Actions
        • Else - Actions
          • Unit Group - Add (Triggering unit) to Cancel_Order_Stop
          • Trigger - Turn on Timed Stop Cancel <gen>
          • Game - Display to (All players) the text: Must build on dirt.
      • Custom script: call RemoveLocation(udg_point1)
  • Timed Stop Cancel
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Cancel_Order_Stop and do (Actions)
        • Loop - Actions
          • Custom script: call IssueImmediateOrderById( GetEnumUnit( ), 0xD0008 )
          • -------- ---------------------------------------- --------
          • Unit - Order (Picked unit) to Stop
          • -------- ---------------------------------------- --------
          • Unit Group - Remove (Picked unit) from Cancel_Order_Stop
          • -------- ---------------------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Cancel_Order_Stop is empty) Equal to True
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
 

Attachments

  • asdasd.w3x
    32.6 KB · Views: 58
Status
Not open for further replies.
Top