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

[Solved] Is this MUI?

Status
Not open for further replies.
Level 20
Joined
Jun 27, 2011
Messages
1,864
  • Lesser Red Potion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lesser Red Potion (Item Bonus)
    • Actions
      • Set Attack_Damage[(Player number of (Owner of (Triggering unit)))] = (Attack_Damage[(Player number of (Owner of (Triggering unit)))] + 2)
      • Wait 120.00 seconds
      • Set Attack_Damage[(Player number of (Owner of (Triggering unit)))] = (Attack_Damage[(Player number of (Owner of (Triggering unit)))] - 2)
 
Level 5
Joined
May 6, 2013
Messages
125
Triggering Unit is MUI and its the only event base action he is using. enlighten me. Where is the problem? looks totally fine to me.
 
Level 5
Joined
May 6, 2013
Messages
125
he uses an array to write the values to so if it fires multiple times the integer will change b4 the wait ends.

ah, i guess thats where the the OP didn't specify what he actually wanted i guess. If he wants the potions effect to stack it will work perfectly (and i highly assume he wants them to). If he doesn't he will need to use a separate array for the potions or think of something different.
 
ah, i guess thats where the the OP didn't specify what he actually wanted i guess. If he wants the potions effect to stack it will work perfectly (and i highly assume he wants them to). If he doesn't he will need to use a separate array for the potions or think of something different.

the problem is they wont stack correctly. it will keep stacking until the waits end. then it will start to unstack. which is not a wanted effect.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Well, have read tutoriials in MUI, try executing thatt trigger and try two units using the item Red Potion, if a conflict in trigger happens that is not MUI. MUI should work for multiple unit even how many times you used them, there will be no conflict in triggers. Thats what I know.
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
Well, have read tutoriials in MUI, try executing thatt trigger and try two units using the item Red Potion, if a conflict in trigger happens that is not MUI. MUI should work for multiple unit even how many times you used them, there will be no conflict in triggers. Thats what I know.

I do know what MUI is, and i can't do that, 2 players are needed to test it.

You can use this: http://www.hiveworkshop.com/forums/spells-569/gui-unit-indexer-1-2-0-2-a-197329/

Then use value[custom value of triggering unit]

Will try, thanks!
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
If I may quote Bribe:
MUI -> Multi-unit-instancing -> can be done many times at once.

MPI -> Multi-player-instancing -> used by people who don't know how to do something MUI or anyone who simply doesn't need more than one instance per player.

And I've found this at the Helper:
Change each variable used to variable[Player number of (Owner of (Triggering unit))] or something like that to make it MPI.

I think you should stick to MUI
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I think you should stick to MUI
Why is that?

If he wants each player to be able to use such a potion, he can just make it MPI and it will work just fine. MUI will overcomplicate it.
Judging from the variable he used (Attack_Damage[x]), his damage-system is already MPI anyway (and making the potion MUI will not do much in that case).
More information on what he's planning would be useful, though.

If you don't want the potions to stack, you can create a boolean variable that will check if the potion is already active or not.
In case a potion is active, give back the potion to the triggering unit. Else, increase attack damage.

I do know what MUI is, and i can't do that, 2 players are needed to test it.
You don't need 2 players to check for MUI (as 1 player should be able to cast it multiple times).
You do, however, need multiple players to test an MPI-system.
Here's a great resource for that: KLoader (this resource doesn't seem to be on the hive).
 
MPI:
  • Lesser Red Potion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lesser Red Potion (Item Bonus)
    • Actions
      • Custom script: local integer i
      • Set Integer = (Player number of (Owner of (Triggering unit)))
      • Custom script: set i = udg_Integer
      • Set Attack_Damage[Integer] = (Attack_Damage[Integer] + 2)
      • Wait 120.00 seconds
      • Custom script: set udg_Integer = i
      • Set Attack_Damage[Integer] = (Attack_Damage[Integer] - 2)
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
MPI:
  • Lesser Red Potion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lesser Red Potion (Item Bonus)
    • Actions
      • Custom script: local integer i
      • Set Integer = (Player number of (Owner of (Triggering unit)))
      • Custom script: set i = udg_Integer
      • Set Attack_Damage[Integer] = (Attack_Damage[Integer] + 2)
      • Wait 120.00 seconds
      • Custom script: set udg_Integer = i
      • Set Attack_Damage[Integer] = (Attack_Damage[Integer] - 2)

I see a nice way of making it MPI... but let me just ask: why not just use another udg integer variable?
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
MPI:
  • Lesser Red Potion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lesser Red Potion (Item Bonus)
    • Actions
      • Custom script: local integer i
      • Set Integer = (Player number of (Owner of (Triggering unit)))
      • Custom script: set i = udg_Integer
      • Set Attack_Damage[Integer] = (Attack_Damage[Integer] + 2)
      • Wait 120.00 seconds
      • Custom script: set udg_Integer = i
      • Set Attack_Damage[Integer] = (Attack_Damage[Integer] - 2)
Now that's great!
Thanks to everyone who replied btw.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Because a global variable will be overwritten if the same trigger is launched by another player before the wait is over.
But it's an array variable where the index is already local (triggering player), making the local variable kind-of obsolete.

The original trigger is equally MPI as your trigger. You're just adding more actions for no real reason.
Shadowing locals is used to make things MUI, not MPI.
 
But it's an array variable where the index is already local (triggering player), making the local variable kind-of obsolete.

The original trigger is equally MPI as your trigger. You're just adding more actions for no real reason.
Shadowing locals is used to make things MUI, not MPI.

Ah yes, correct.
I mistook the "triggering unit" for "casting unit" which would refer only to the latest unit. So yes, the original trigger is MPI as well.
 
Level 2
Joined
Apr 15, 2009
Messages
25
You don't need 2 players to check for MUI (as 1 player should be able to cast it multiple times).
You do, however, need multiple players to test an MPI-system.
Here's a great resource for that: KLoader (this resource doesn't seem to be on the hive).

You can test most MPI systems using shared unit control.
 
Status
Not open for further replies.
Top