Unit Research Progress, get triggering player?

Status
Not open for further replies.
Level 7
Joined
May 15, 2009
Messages
169
While making what I thought was a basic item upgrade system, I ran into a pretty solid bump.

A shop owned by player 0 (neutral) is where I buy the item upgrade. How do I reference myself in a trigger as the person "buying" the upgrade?


Unit - Any Unit research progress is Completed


UI - Display "1" for (Player group((Triggering player))) to Subtitle area

That is my very simply way of figuring out that "triggering player" doesn't work; despite the fact that in the
tooltip" for the event, it says that "triggering player" should reference the person who started the research.

The building has a research ability; an exact copy of one one I am using on my heroes; which works fine on them.

The button I am clicking and getting no result on, in the shop, is linked to an upgrade; the same way way it is in a similar, working trigger.

Any thoughts?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
A shop owned by player 0 (neutral) is where I buy the item upgrade.
So "Player 0 (neutral)" is researching the upgrade.

How do I reference myself in a trigger as the person "buying" the upgrade?
Unit - Any Unit research progress is Completed
You did not comple the research, "Player 0 (neutral)" did. Whoever paid for it has nothing to do with who gets the research.

You have 2 options.
1. Make the shop be owned by you so you are doing the research.
2. Track when the upgrade is purchased. It should generate a player based resource event which you can tie with a research order to get who brought it.
 
Level 7
Joined
May 15, 2009
Messages
169
really what the question was, is there any event response to signify that I was the person purchasing or initiating the research. I guess the answer is no.

It would be silly to give everyone 8 of their own shops, soooo....

Basing it on a "player resource change" is the only way? Considering in a hero arena, a players resources change on an "every second" basis, and there could potentially be a dozen players... Wouldn't that put a lot of unneeded stress on the system? An even firing a thousand times a minute for the entire game?

If I were to remake the system, using units rather than upgrades, would it be possible to get the player who purchased the unit from a neutral shop?

Shouldn't there be a "get buying unit" somewhere in this?
 
Level 7
Joined
May 15, 2009
Messages
169
It is an item system though; I was attempting to get rid of the wc3 system of using dummy items to upgrade items.

I didn't think of a dialog system. Hmm, I have been using a lot of them, and they are perdy... I would then only have to check which dialog object was selected, make sure the person has the required minerals, and ... yeah.

Thanks for pointing the idea out.
 
Level 7
Joined
May 15, 2009
Messages
169
Another problem...


Unit - Disable Inventory For "Unit"

Why can I not disable an inventory for a unit? every time I get "Function took too long" error. I have a unit in the map with an inventory. I type -2 to disable his inventory. I get an error saying it took too long, and his inventory is not disabled.

...Another...work...around?

How would I make it so that a player cannot move items around in a unit's inventory? ...Without have to write up conditions for every item and every inventory slot to move an item back to a slot of it is moved to another? That would just be messy editing.

Note: Simply saving his items into variables and removing his inventory ability is not a valid option. I need the stats from items to remain; but simply make it so a player cannot move his items.
 
Status
Not open for further replies.
Top