• 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.

[Trigger] Having problems with MUI-ing THIS....

Status
Not open for further replies.
Level 10
Joined
Feb 8, 2006
Messages
297
Edit2: Well, I guess, problem solved! Thanks, you guys! :D

I'm pretty sure I'll be ablit to compile the triggers into a smaller format, and the unleakify it, but until then, have fun!

Thanks again :)
The map and the triggers found on this thread are now of the "fixed" verison.

Edit: By MUI, I thought I meant Multi User Instancable... so the title should actually say "MPI"... sorry for the mixup! ><

Outdated:
"For a small while now, I've been making Gol'em, wich will be an AoS like map. Nothing special there.

What makes it uniqe is the fact that you control huge, badass golem, medival mechas, basicly, to defeat your opponents. A golem is built up of multiple dummy items, that are controlled via triggers. This allows players to actually stomp their enemies, and having upgradeable bodyparts, along with many other fun things....

Here's the problem: It works fine when Player 1 (Red, for those of you inclined), but if you try play it with any other player slot, the system fails miserably... I have no idea what the problem could be. I've checked and rechecked the system, but other then the occasional tiny memory leak, I couldnt find anything...

Please, please, please! If you have any idea as to how to fix this, tell me!
The triggers are right below, the map can be found at the bottom of the post, ready for download.

I thank, in advance, any suggestions that may come my way. :)"

  • Melee Initialization New
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • Set Players[1] = Player 1 (Red)
      • Set Players[2] = Player 2 (Blue)
      • Set Players[3] = Player 3 (Teal)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Crumbling Feet (Foot) for Players[(Integer A)] at ((Players[(Integer A)] start location) offset by 200.00 towards 180.00 degrees) facing 270.00 degrees
          • Set GolemLegsRight[(Integer A)] = (Last created unit)
          • Set GolemFootRight[(Integer A)] = (Position of (Last created unit))
          • Unit - Create 1 Crumbling Feet (Foot) for Players[(Integer A)] at ((Players[(Integer A)] start location) offset by 200.00 towards 0.00 degrees) facing 270.00 degrees
          • Set GolemLegsLeft[(Integer A)] = (Last created unit)
          • Set GolemFootLeft[(Integer A)] = (Position of (Last created unit))
          • Unit - Create 1 Crumbling Core (Chest) for Players[(Integer A)] at ((Players[(Integer A)] start location) offset by 0.00 towards 0.00 degrees) facing 270.00 degrees
          • Set Golem[(Integer A)] = (Last created unit)
          • Set Torso[(Integer A)] = (Position of (Last created unit))
          • Unit Group - Add (Last created unit) to Golemz
          • Unit - Create 1 Crumbling Skull (Head) for Players[(Integer A)] at ((Players[(Integer A)] start location) offset by 0.00 towards 0.00 degrees) facing 270.00 degrees
          • Set GolemHead[(Integer A)] = (Last created unit)
          • Unit - Create 1 Crumbling Arm (Shoulder) for Players[(Integer A)] at ((Players[(Integer A)] start location) offset by 100.00 towards 90.00 degrees) facing 270.00 degrees
          • Set GolemShoulderLeft[(Integer A)] = (Last created unit)
          • Unit - Create 1 Crumbling Arm (Shoulder) for Players[(Integer A)] at ((Players[(Integer A)] start location) offset by 100.00 towards -90.00 degrees) facing 270.00 degrees
          • Set GolemShoulderRight[(Integer A)] = (Last created unit)
          • Unit - Create 1 Crumbing Fist (Hand) for Players[(Integer A)] at ((Position of GolemShoulderRight[(Integer A)]) offset by 100.00 towards 270.00 degrees) facing 0.00 degrees
          • Set GolemHandRight[(Integer A)] = (Last created unit)
          • Unit - Create 1 Crumbing Fist (Hand) for (Picked player) at ((Position of GolemShoulderLeft[(Integer A)]) offset by 100.00 towards 270.00 degrees) facing 0.00 degrees
          • Set GolemHandLeft[(Integer A)] = (Last created unit)
          • Set Moving[(Integer A)] = False
          • Set IsitRightLeg[(Integer A)] = True
      • Trigger - Turn on GolemHead <gen>
      • Trigger - Turn on Moving Golem <gen>

  • Moving Golem
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Golemz and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Moving[(Player number of (Owner of (Picked unit)))] Equal to True
            • Then - Actions
              • Set Torso[(Player number of (Owner of (Picked unit)))] = ((Position of GolemLegsRight[(Player number of (Owner of (Picked unit)))]) offset by ((Distance between (Position of GolemLegsRight[(Player number of (Owner of (Picked unit)))]) and (Position of GolemLegsLeft[(Player number of (Owner of (Picked unit)))])) / 2
              • Unit - Move Golem[(Player number of (Owner of (Picked unit)))] instantly to Torso[(Player number of (Owner of (Picked unit)))]
            • Else - Actions

  • GolemHead
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set Torso[(Integer A)] = ((Position of GolemLegsRight[(Integer A)]) offset by ((Distance between (Position of GolemLegsRight[(Integer A)]) and (Position of GolemLegsLeft[(Integer A)])) / 2.00) towards (Angle from (Position of GolemLegsRight[(Integer A)]) to (Position of GolemLegsLeft
          • Unit - Move GolemHead[(Integer A)] instantly to Torso[(Integer A)], facing (Facing of Golem[(Integer A)]) degrees
          • Unit - Order GolemShoulderLeft[(Integer A)] to Move To (Torso[(Integer A)] offset by 100.00 towards ((Facing of Golem[(Integer A)]) - 90.00) degrees)
          • Unit - Order GolemShoulderRight[(Integer A)] to Move To (Torso[(Integer A)] offset by 100.00 towards ((Facing of Golem[(Integer A)]) + 90.00) degrees)
          • Unit - Move GolemHandLeft[(Integer A)] instantly to ((Position of GolemShoulderLeft[(Integer A)]) offset by 100.00 towards ((Facing of Golem[(Integer A)]) + 0.00) degrees), facing ((Facing of Golem[(Integer A)]) + 90.00) degrees
          • Unit - Move GolemHandRight[(Integer A)] instantly to ((Position of GolemShoulderRight[(Integer A)]) offset by 100.00 towards ((Facing of Golem[(Integer A)]) + 0.00) degrees), facing ((Facing of Golem[(Integer A)]) + 90.00) degrees

  • ChestP1
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ordered unit) Equal to Golem[(Player number of (Owner of (Ordered unit)))]
    • Actions
      • Set Torso[(Player number of (Owner of (Ordered unit)))] = ((Position of GolemLegsRight[(Player number of (Owner of (Ordered unit)))]) offset by ((Distance between (Position of GolemLegsRight[(Player number of (Owner of (Ordered unit)))]) and (Position of GolemLegsLeft[(Player number of (Owner of (Ordered unit)))]))
      • Unit - Move Golem[(Player number of (Owner of (Ordered unit)))] instantly to Torso[(Player number of (Owner of (Ordered unit)))]
      • Wait 0.10 seconds
      • Unit - Order (Ordered unit) to Stop
  • ChestP1 OBJ
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Unit-type of (Ordered unit)) Equal to Crumbling Core (Chest)
    • Actions
      • Player Group - Pick every player in (Player group((Owner of (Ordered unit)))) and do (Actions)
        • Loop - Actions
          • Set Torso[(Player number of (Picked player))] = ((Position of GolemLegsRight[(Player number of (Picked player))]) offset by ((Distance between (Position of GolemLegsRight[(Player number of (Picked player))]) and (Position of GolemLegsLeft[(Player number of (Picked player))])) / 2.00) towards (Angle from (P
          • Unit - Move Golem[(Player number of (Picked player))] instantly to Torso[(Player number of (Picked player))]
          • Wait 0.10 seconds
          • Unit - Order (Ordered unit) to Stop

  • ForwardP2
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Move
          • (Owner of (Casting unit)) Equal to Player 2 (Blue)
    • Actions
      • Unit - Pause Golem[2]
      • Set Moving[2] = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IsitRightLeg[2] Equal to True
        • Then - Actions
          • Special Effect - Create a special effect at GolemFootRight[2] using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
          • Set GolemFX[((2 x 10) + 1)] = (Last created special effect)
          • Set GolemFootRight[2] = ((Position of (Casting unit)) offset by 250.00 towards ((Facing of (Casting unit)) - 30.00) degrees)
          • Unit - Order GolemLegsRight[2] to Move To GolemFootRight[2]
          • Animation - Change GolemLegsRight[2] flying height to 200.00 at 100.00
          • Wait 2.00 game-time seconds
          • Special Effect - Destroy GolemFX[((2 x 10) + 1)]
          • Animation - Change GolemLegsRight[2] flying height to 0.00 at 150.00
          • Wait 1.00 game-time seconds
          • Special Effect - Create a special effect at GolemFootRight[2] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Set GolemFX[((2 x 10) + 1)] = (Last created special effect)
          • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 100.00 at GolemFootRight[2], dealing 500.00 damage of attack type Chaos and damage type Normal
          • Destructible - Pick every destructible within 125.00 of GolemFootRight[2] and do (Destructible - Kill (Picked destructible))
          • Unit - Unpause Golem[2]
          • Wait 1.00 game-time seconds
          • Special Effect - Destroy GolemFX[((2 x 10) + 1)]
          • Set Moving[2] = False
          • Set IsitRightLeg[2] = False
        • Else - Actions
          • Special Effect - Create a special effect at GolemFootLeft[2] using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
          • Set GolemFX[((2 x 10) + 2)] = (Last created special effect)
          • Set GolemFootLeft[2] = ((Position of (Casting unit)) offset by 250.00 towards ((Facing of (Casting unit)) + 30.00) degrees)
          • Unit - Order GolemLegsLeft[2] to Move To GolemFootLeft[2]
          • Animation - Change GolemLegsLeft[2] flying height to 200.00 at 100.00
          • Wait 2.00 game-time seconds
          • Special Effect - Destroy GolemFX[((2 x 10) + 2)]
          • Animation - Change GolemLegsLeft[2] flying height to 0.00 at 150.00
          • Wait 1.00 game-time seconds
          • Special Effect - Create a special effect at GolemFootLeft[2] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Set GolemFX[((2 x 10) + 2)] = (Last created special effect)
          • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 100.00 at GolemFootLeft[2], dealing 500.00 damage of attack type Chaos and damage type Normal
          • Destructible - Pick every destructible within 125.00 of GolemFootLeft[2] and do (Destructible - Kill (Picked destructible))
          • Unit - Unpause Golem[2]
          • Wait 1.00 game-time seconds
          • Special Effect - Destroy GolemFX[((2 x 10) + 2)]
          • Set Moving[2] = False
          • Set IsitRightLeg[2] = True
 

Attachments

  • Gol'em.w3x
    65.1 KB · Views: 37
Last edited:
Level 10
Joined
Feb 8, 2006
Messages
297
Meh, I thought MUI was Multi-User-Inststanceable...
*faceplams himself*

aaanyways, it IS supposed to be running on arrays, if you look at it...
eg: Order GolemLegsRight[Player Number of (Casting Unit)] to move to...whereever...

Each and every bodypart and point/position IS in its own player's array...
Isn't it?
I mean, that's how the system holds even the player 1 golem together...

It seems, that during creation, not all points are marked for the other players. Most probably, the error is found somewhere in the Melee Initialization, but I really cant find the error itself!
 
Level 16
Joined
Jun 25, 2008
Messages
1,043
Well, I have no idea what causes your problems, but I think you should know this.

EVERY, and I'm telling you, EVERY one of your triggers leaks like a slashed throat, really I checked all of them, and they have like a minimum of 4 leaks in each trigger. Which is BAD. Very BAD.

You should really read up on leaks and leak-fixing, it's in the stickies of this forum.

But, after a short overlook I noticed you use a lot of waits in your code, waits are widely known to NOT be MUI in any way, and I believe it accounts for MPI as well, but I'm not 100% sure on that point.
 
Level 10
Joined
Feb 8, 2006
Messages
297
I know about the leaks.
Seriously, I do. I know not many people belive me, but trust me. I usually try to make things work, and work up from there.


On another note, I'm pretty sure my current perdicament is not due to the waits. As I said, the source of the problem is most likely found in the initialization, but I really dont know!

Leak fixing is a thing of the future, unless it's the leaks that are causing the problem (highly doubt it :p)
 
I know about the leaks.
Seriously, I do. I know not many people belive me, but trust me. I usually try to make things work, and work up from there.


On another note, I'm pretty sure my current perdicament is not due to the waits. As I said, the source of the problem is most likely found in the initialization, but I really dont know!

Leak fixing is a thing of the future, unless it's the leaks that are causing the problem (highly doubt it :p)

I work the same way, and I wish I didn't. I'm trying to get in the habit of destroying leaks at the same time I initilize them.
 
Level 10
Joined
Feb 8, 2006
Messages
297
Alright! It's working...sorta. ><

For some strange reason, however, only one of the golem's hands apear... meh, I'll fix that later....

I'm still pretty sure I can simplify the triggers much, much more, but until then, thanks!

Gentlemen, swing easy! :D
 
Status
Not open for further replies.
Top