HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Problems/limits with "Selecting player"-function?

01-06-2010, 01:16 PM#1
Neversleeping
I'm completely stuck with this, and I think the answer might be helpful to others as well. If there is an answer to this.
Basically, what I'm trying to do, is this very simple procedure:



Meta-code:

Event - A specific unit is selected
Conditions - the player selecting the unit is in a certain player group.
Action - Apply a certain camera view for the player selecting the unit.


Sounds easy enough, don't it? If anyone manages this you're welcome to mock my skills. But I don't think this is as trivial as it sounds.
01-06-2010, 01:37 PM#2
Tot
and where's your prob?
01-06-2010, 04:15 PM#3
Neversleeping
My problem is that it's not working. So I thought, perhaps, some of you could either tell me how to or confirm that it can't be done.

Wanna give it a shot?
01-06-2010, 05:02 PM#4
DioD
this works with some delay, but works.

try again (and possible again) this is possible.
01-06-2010, 05:14 PM#5
Neversleeping
I've worked on this for ages. I won't be able to fix this particular thing without help.

Since the none of the actions can call which player doing the selection, my only way of getting it to work by having the condition demand a certain player is selecting the unit. But then I would have to make one trigger per player. That will be 8 times the number of triggers I thought I'd need, ending with almost 50 for a simple thing. Can't do that...
01-06-2010, 05:16 PM#6
DioD
just make one trigger per player and you will always know who selected unit.
01-06-2010, 05:27 PM#7
Neversleeping
Yes, but my case here is that each player already need 6 triggers. For 8 players, that would total up to 48 triggers. It sounds insane, but I can do it.

But performance/memory/cpu-wise, is this anything to worry about?

Thanks for your help, man.
01-06-2010, 07:07 PM#8
Fledermaus
Triggering Player works for me in selection events..
01-06-2010, 07:49 PM#9
Neversleeping
I'm pretty sure it doesn't, cause I've tried. Sure?
01-06-2010, 09:25 PM#10
Neco
I just confirmed what Fledermaus said in a quickly made custom map.

"Triggering Player" works fine.

-------------------
Events
Unit - Siege Engine 0000 <gen> Is selected
Conditions
Actions
Camera - Pan camera for (Triggering player) to (Position of Footman 0001 <gen>) over 2.00 seconds
--------------------
01-07-2010, 11:07 AM#11
Neversleeping
Wow, then I apologize. Must have been something else to keep it from working. Right back on the horse, then!

Thanks a lot
01-07-2010, 08:47 PM#12
Neversleeping
No, I have now tried a hundred times more and I am now positive that Triggering Player doesn't call the player selecting the unit.

Trigger:
Unit - Elementalist 0391 <gen> Is selected

Camera - Rotate camera 360.00 degrees around (Position of Elementalist 0391 <gen>) for (Triggering player) over 2.00 seconds


Nothing happens, not with any camera actions. Could it be a different editor version or something?
01-07-2010, 10:52 PM#13
Neco
It would seem that I was incorrect.

After some testing, I have concluded that "Triggering Player" refers to the owner of the unit selected.

You could use:
Trigger:
Camera - Rotate camera 360.00 degrees around (Center of (Playable map area)) for (Random player from (All players matching (((Triggering unit) is selected by (Matching player)) Equal to True))) over 2.00 seconds
But that would mean it would rotate the camera for any other people that have that unit selected.

EDIT: I do remember that TBR uses the selection event to trigger quests that are given to the player that selected the quest giver, so there MUST be a way to do this.
01-07-2010, 11:33 PM#14
Neversleeping
Good to hear you agree, thought I was going crazy or something!


Hmm.. your suggestion might actually work (if it works that is, looks complicated!). Everything is solvable from there if I can manage to refer to whoever pressed the button.

Let me check it out.
01-08-2010, 12:06 AM#15
Neversleeping
That crazy function seems to work!!
Shame on blizzard for making simple stuff complicated, but you damn sure found a way around it. Genius!