• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

[General] What are the best settings?

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,601
Hello.

I have some problems with making smoother my campaign with Wc3 Map Optimizer. I wonder what are the best settings. So far I've seen two bugs. First one is that one unit is selling few wrong items and one very simple trigger isn't working(it works without optimizing):

  • Rescue 1
    • Events
      • Unit - A unit comes within 200.00 of Captive Man (Male 2) 0159 <gen>
    • Conditions
      • (Triggering unit) Equal to AAAPhodom
    • Actions
      • Set TempLoc = (Position of Rescue_Unit[1])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units within 512.00 of TempLoc matching ((((Matching unit) is in (Units owned by Neutral Hostile)) Equal to True) and (((Matching unit) is alive) Equal to True)))) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set Floating_Text_Time = 2.00
          • Set Rescue_Amount = (Rescue_Amount + 1)
          • Set Floating_Text_Text = Thanks!
          • Set Rescue_Fade2 = 0.00
          • Floating Text - Create floating text that reads (|c00FEBA0E + (Floating_Text_Text + |r)) at TempLoc with Z offset 0.00, using font size 10.00, color (0.00%, 50.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to (Floating_Text_Time - 2.00) seconds
          • Floating Text - Change the lifespan of (Last created floating text) to Floating_Text_Time seconds
          • Custom script: call RemoveLocation(udg_TempLoc)
          • Trigger - Run Update Quest <gen> (checking conditions)
          • For each (Integer Rescue_Fade1) from 1 to 10, do (Actions)
            • Loop - Actions
              • Set Rescue_Fade2 = (Rescue_Fade2 + 10.00)
              • Animation - Change Rescue_Unit[1]'s vertex coloring to (100.00%, 100.00%, 100.00%) with Rescue_Fade2% transparency
              • Wait 0.30 seconds
          • Unit - Remove Rescue_Unit[1] from the game
        • Else - Actions
          • Custom script: call RemoveLocation(udg_TempLoc)
So what are the best settings you would recommend for me?

107533d1319628826-what-best-settings-optimizer.jpg


I'm using Wc3 Map Optimizer with together with cphelper by Shadow Daemon(it optimizes the whole campaign instead of one map).
 

Attachments

  • Optimizer.jpg
    Optimizer.jpg
    83.5 KB · Views: 173
Level 20
Joined
Jul 14, 2011
Messages
3,213
About Optimizing: Well... I use All of them.

About the Trigger:
- Who is "Rescue_Unit[1]"? You declare the point, but who's the unit? Is it declared before?

- (Number of units in (Units within 512.00 of TempLoc matching ((((Matching unit) is in (Units owned by Neutral Hostile)) Equal to True) and (((Matching unit) is alive) Equal to True)))) Equal to 0

- Red: It's a Unit group. Declare it in a Unit-Group Variable before, and use the variable instead, removing it later with "call DestroyGroup(udg_YourGroupName)"

- orange: same than Red

- Yellow: Huh? Equal to 0? That's a typing mistake I guess :p

As you can see, you're declaring "Temp_Loc" in the trigger "Actions" block, but, besides you're removing the variable Twice, you're removing them inside the If/Then/Else blocks, which means you're not removing it.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
I check everything. I can't say what makes the optimizer break the trigger. Maybe add debug messages.

- Yellow: Huh? Equal to 0? That's a typing mistake I guess :p

Number of units in group == 0

As you can see, you're declaring "Temp_Loc" in the trigger "Actions" block, but, besides you're removing the variable Twice, you're removing them inside the If/Then/Else blocks, which means you're not removing it.

Nothing wrong with the way the loc is removed :)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Oh Yeah! I noticed the thing with the Loc. Ussually I remove the Loc after the whole If/Then/else Block, and not inside.
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
Aeroblyctos, this trig should more look like this ;p

(Matching unit) is in (Units owned by Neutral Hostile)
->>
(Onwer of (Matching unit)) Equal to Neutral Hostile

bj_lastCreatedGroup == group leak removal.
  • Rescue 1
    • Events
      • Unit - A unit comes within 200.00 of Captive Man (Male 2) 0159 <gen>
    • Conditions
      • (Triggering unit) Equal to AAAPhodom
    • Actions
      • Set TempLoc = (Position of Rescue_Unit[1])
      • Custom script: set bj_wantDestroyGroup = true
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units within 512.00 of TempLoc matching ((((Owner of (Matching unit)) is in Neutral Hostile) Equal to True) and (((Matching unit) is alive) Equal to True))) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set Floating_Text_Time = 2.00
          • Set Rescue_Amount = (Rescue_Amount + 1)
          • Set Floating_Text_Text = Thanks!
          • Set Rescue_Fade2 = 0.00
          • Floating Text - Create floating text that reads (|c00FEBA0E + (Floating_Text_Text + |r)) at TempLoc with Z offset 0.00, using font size 10.00, color (0.00%, 50.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the fading age of (Last created floating text) to (Floating_Text_Time - 2.00) seconds
          • Floating Text - Change the lifespan of (Last created floating text) to Floating_Text_Time seconds
          • Trigger - Run Update Quest <gen> (checking conditions)
          • Custom script: call RemoveLocation(udg_TempLoc)
          • For each (Integer Rescue_Fade1) from 1 to 10, do (Actions)
            • Loop - Actions
              • Set Rescue_Fade2 = (Rescue_Fade2 + 10.00)
              • Animation - Change Rescue_Unit[1]'s vertex coloring to (100.00%, 100.00%, 100.00%) with Rescue_Fade2% transparency
              • Wait 0.30 seconds
          • Unit - Remove Rescue_Unit[1] from the game
        • Else - Actions
          • Custom script: call RemoveLocation(udg_TempLoc)
 
Last edited:
Status
Not open for further replies.
Top