HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Little multiplayer problem

04-30-2007, 03:38 AM#1
olavo
Hi.. i'm having a problem whit a dismiss ability.. its suposed to be multiplayer, but it only works for the host...
can anyone halp me?
here's the trigger:
Trigger:
Dismiss Unit
Collapse Events
Unit - A unit Is issued an order with no target
Collapse Conditions
(Issued order) Equal to Night Elf Mountain Giant - Taunt
Collapse Actions
Set Number = (Player number of (Owner of (Triggering unit)))
Unit Group - Remove all units from DismissGroup[Number]
Set DismissedUnit[Number] = (Triggering unit)
Unit Group - Add (Random unit from (Units in Greek Camp <gen>((Owner of (Matching unit)) Equal to Player 11 (Dark Green)))) to DismissGroup[(Player number of (Owner of (Triggering unit)))]
Collapse Unit Group - Pick every unit in DismissGroup[(Player number of (Owner of (Triggering unit)))] and do (Actions)
Collapse Loop - Actions
Set NewUnit[Number] = (Picked unit)
Set DismissTarget2[Number] = (Position of NewUnit[Number])
Set DismissTarget1[Number] = (Position of (Triggering unit))
Unit - Change ownership of NewUnit[Number] to (Player(Number)) and Retain color
Unit - Change ownership of (Triggering unit) to Player 11 (Dark Green) and Retain color
Unit - Order (Triggering unit) to Move To DismissTarget2[Number]
Unit - Order NewUnit[Number] to Move To DismissTarget1[Number]
Unit Group - Remove (Triggering unit) from Players
Unit Group - Add NewUnit[Number] to Players
04-30-2007, 03:47 AM#2
Dil999
First thought: Whats with the overuse of variables? Than entire spell could be half the size without using variables.
I'll try to make sense of this tomorrow.. in the meantime please explain what this is supposed to do in the first place.
04-30-2007, 03:51 AM#3
olavo
sorry... the unit that casts this thing is supposed to change owner to a non controled player and go to the camp (position of "new unit") and this so called new unit is supposed to run to the caster initial position and change owner to the player that casted the spell...
got it?
04-30-2007, 03:58 AM#4
Dil999
Hmm.. I have no idea why this wouldnt work
Try doing the following:
Change A unit Is issued an order with no target to A Unit starts the Effect of an Ability
Remove all the variables in that trigger, theres absolutely no need for any of them.
04-30-2007, 04:02 AM#5
olavo
the order thing is working fine...
and about the variable, how i'm supposed to detect the random unit latter without any variables?
04-30-2007, 04:11 AM#6
Dil999
If you need to detect it later, you can add it to a variable later in the trigger.
For example:
Trigger:
Set Number = (Player number of (Owner of (Triggering unit)))
Unit Group - Remove all units from DismissGroup[Number]
Theres no need for this, you can simply do:
Trigger:
Unit Group - Remove all units from DismissGroup(Player number of (Owner of (Triggering unit)))
04-30-2007, 05:49 AM#7
olavo
The loop thig was screwing all the MUI thing... used another function, now is working!
but thx for the help anyway
how it looks like now:
Trigger:
Dismiss Unit
Collapse Events
Unit - A unit Is issued an order with no target
Collapse Conditions
(Issued order) Equal to Night Elf Mountain Giant - Taunt
Collapse Actions
Set Number = (Player number of (Owner of (Triggering unit)))
Unit Group - Remove all units from DismissGroup[Number]
Set NewUnit[Number] = (Random unit from (Units in Greek Camp <gen> owned by Player 11 (Dark Green)))
Set DismissTarget2[Number] = (Position of NewUnit[Number])
Set DismissTarget1[Number] = (Position of (Triggering unit))
Unit Group - Remove (Triggering unit) from Players
Unit Group - Add NewUnit[Number] to Players
Unit - Change ownership of NewUnit[Number] to (Player(Number)) and Retain color
Unit - Change ownership of (Triggering unit) to Player 11 (Dark Green) and Retain color
Unit - Order NewUnit[Number] to Move To DismissTarget1[Number]
Unit - Order (Triggering unit) to Move To DismissTarget2[Number]