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

[Trigger] Building quest triggers don't work as intended

Status
Not open for further replies.
Level 2
Joined
Mar 10, 2021
Messages
15
Hello! I'm currently making a(nother) test map laying the groundwork for my upcoming campaign. Basically, I'm putting everything in without regard to what should be where and when. I'm stuck at this quest when the heroes have to build a base camp. It's a "8 players" coop map with fully shared heroes, so it can be played solo easily. I'm still debating this, honestly.

I realize there's many problems with this quest, both with the triggers and the custom objects, so I've posted the objects part in the main forum.

Breaking down the quest:
First, the melee heroes go chop some wood to gather base materials. Works good, but I would like the return point to change in function with the quantity of lumber acquired (now it's a circle of power, but I'd like first a ghostly log, then a solid one after the first return)
  • Base Camp Give
    • Events
      • Unit - A unit enters CampQuest <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Highlander 0007 <gen>
          • (Triggering unit) Equal to Indian 0002 <gen>
          • (Triggering unit) Equal to Knight 0009 <gen>
          • (Triggering unit) Equal to Roman 0005 <gen>
          • (Triggering unit) Equal to Egyptian 0006 <gen>
          • (Triggering unit) Equal to Barbarian 0003 <gen>
          • (Triggering unit) Equal to Hippie 0008 <gen>
          • (Triggering unit) Equal to Futureman 0004 <gen>
    • Actions
      • Quest - Mark BaseCampQuest as Discovered
      • Quest - Display to (All players) the Quest Discovered message: Now that you have s...
      • Unit - Add Harvest Lumber - all melee to Highlander 0007 <gen>
      • Unit - Add Harvest Lumber - all melee to Knight 0009 <gen>
      • Unit - Add Harvest Lumber - all melee to Roman 0005 <gen>
      • Unit - Add Harvest Lumber - all melee to Barbarian 0003 <gen>
      • Unit - Add Blueprints - all advanced to Futureman 0004 <gen>
      • Unit - Add Build Camp - all to Highlander 0007 <gen>
      • Unit - Add Build Camp - all to Indian 0002 <gen>
      • Unit - Add Build Camp - all to Knight 0009 <gen>
      • Unit - Add Build Camp - all to Roman 0005 <gen>
      • Unit - Add Build Camp - all to Egyptian 0006 <gen>
      • Unit - Add Build Camp - all to Barbarian 0003 <gen>
      • Unit - Add Build Camp - all to Hippie 0008 <gen>
      • Unit - Add Build Camp - all to Futureman 0004 <gen>
      • Unit - Create 1 Lumber drop point for Player 1 (Red) at (Center of LumberDrop <gen>) facing 0.00 degrees
      • Unit - Create 1 Lumber drop point for Player 3 (Teal) at (Center of LumberDrop <gen>) facing 0.00 degrees
      • Unit - Create 1 Lumber drop point for Player 4 (Purple) at (Center of LumberDrop <gen>) facing 0.00 degrees
      • Unit - Create 1 Lumber drop point for Player 6 (Orange) at (Center of LumberDrop <gen>) facing 0.00 degrees
      • Trigger - Turn off (This trigger)
Second, one of the "advanced" hero (as in modern/futurist, basically a marine) gets a "mark base camp site" summon ability (Blueprints) via triggers. Works fine, although not the way I would have liked: I had to make it a circle of power instead of a shadow building of the camp (I did not find any way to do it).

Third, once every melee has enough lumber, all the heroes get a repair ability and the "base camp site" changes to the actual base camp for the heroes to work on. Doesn't work so good. (I'll copy the whole trigger) A problem is that [player 1]'s lumber doesn't actually get to 100, it stays at 80 after his last return, before resources gets shared between all players.
  • Base Camp Lumber Collect
    • Events
      • Player - Player 1 (Red)'s Total lumber gathered becomes Equal to 100.00
      • Player - Player 3 (Teal)'s Total lumber gathered becomes Equal to 100.00
      • Player - Player 4 (Purple)'s Total lumber gathered becomes Equal to 100.00
      • Player - Player 6 (Orange)'s Total lumber gathered becomes Equal to 100.00
    • Conditions
      • (BaseCampQuReq[1] is completed) Equal to False
    • Actions
      • Quest - Mark BaseCampQuReq[1] as Completed
      • Unit - Remove Harvest Lumber - all melee from Highlander 0007 <gen>
      • Unit - Remove Harvest Lumber - all melee from Knight 0009 <gen>
      • Unit - Remove Harvest Lumber - all melee from Roman 0005 <gen>
      • Unit - Remove Harvest Lumber - all melee from Barbarian 0003 <gen>
      • Unit - Remove Blueprints - all advanced from Futureman 0004 <gen>
      • Unit Group - Pick every unit in (Units in LumberDrop <gen>) and do (Unit - Remove (Picked unit) from the game)
      • Wait 2.00 seconds
      • Player - Set Player 1 (Red) Current lumber to 50
      • Player - Set Player 2 (Blue) Current lumber to 50
      • Player - Set Player 3 (Teal) Current lumber to 50
      • Player - Set Player 4 (Purple) Current lumber to 50
      • Player - Set Player 5 (Yellow) Current lumber to 50
      • Player - Set Player 6 (Orange) Current lumber to 50
      • Player - Set Player 7 (Green) Current lumber to 50
      • Player - Set Player 8 (Pink) Current lumber to 50
      • Quest - Display to (All players) the Quest Update message: Now you are ready t...
      • Unit - Remove (Random unit from (Units in CampSet <gen> matching ((Unit-type of (Matching unit)) Equal to Site of the future camp))) from the game
      • Trigger - Run Base Camp Built test <gen> (ignoring conditions)
      • Trigger - Turn off (This trigger)
I've also made four of the following trigger, one for each melee/lumberjack:
  • Highlander Lumber
    • Events
      • Player - Player 1 (Red)'s Total lumber gathered becomes Equal to 100.00
    • Conditions
      • (BaseCampQuReq[1] is completed) Equal to False
    • Actions
      • Unit - Order Highlander 0007 <gen> to Stop
      • Trigger - Turn off (This trigger)
So, is there something wrong with my triggers? Do you have any suggestions how to improve them?
 
Status
Not open for further replies.
Top