• 🏆 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!

1 quest and 1 build particle question

Status
Not open for further replies.
Level 7
Joined
Jun 30, 2008
Messages
322
Hy

I want ask two question first is the easier:

So i want to do a quest where you need to build x building to complete
(build 4 farm for example)

How do i do? I'm new in the triggers ^^

second, it harder.

My worker can build a building (called road) and i want that you can build only next to this building so forexample road: A another building: B

You can build the B building only looks like this: AB
and you can't looks like this: A B
thank you+rep
 
Level 4
Joined
Aug 30, 2009
Messages
70
For your first question you could use this:
  • Quest
    • Events
    • Conditions
    • Actions
      • Quest - Create a Required quest titled Quest with the description Make 4 farms, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set NumberRequired = 4
      • Set BuildingType = Hof
      • Trigger - Turn on QuestKills <gen>
  • QuestBuilt
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to BuildingType
    • Actions
      • Set Built = (Built + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Built Equal to NumberRequired
        • Then - Actions
          • Quest - Mark (Last created quest) as Completed
          • Game - Display to (All players) the text: You solved the ques...
          • Trigger - Turn off (This trigger)
        • Else - Actions
QuestBuilt should be Initially Off

For the second Question I think this should Work
  • Road
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Set BuildOK = False
      • Set TempPoint1 = (Position of (Constructing structure))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units of type Hof) and do (Actions)
        • Loop - Actions
          • Set TempPoint2 = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TempPoint1 and TempPoint2) Less than or equal to 150.00
            • Then - Actions
              • Set BuildOK = True
            • Else - Actions
          • Custom script: call RemoveLocation( udg_TempPoint2 )
      • Custom script: call RemoveLocation( udg_TempPoint1 )
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BuildOK Equal to False
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop
          • Unit - Remove (Constructing structure) from the game
        • Else - Actions
 
Status
Not open for further replies.
Top