Hello everyone, I've pretty much browsed all the current threads on this subject... I've tried that item library...without any luck...
So I was wondering if there was anyone who had found a solution to **"immitate" clicking on an item icon that is in the unit's inventory** via triggers.
Basicly, I'm trying to set up a trigger that fires when a player clicks on a dialog button, and it will let the player select the location to throw the missile.
You're referring to the library that I helped with, right? It should be able to handle this
From what I understand of your problem, you're not going about it correctly. You can't use triggers to 'click' an item once and get a targeting cursor. I don't believe triggers let you modify the player's cursor like that.
You can click the dialog button, then register a "mouse is clicked" event, and use the library to issue an order on the item and target the location the mouse was clicked.
You're referring to the library that I helped with, right? It should be
able to handle this
From what I understand of your problem, you're not going about it
correctly. You can't use triggers to 'click' an item once and get a
targeting cursor. I don't believe triggers let you modify the player's
cursor like that.
You can click the dialog button, then register a "mouse is clicked"
event, and use the library to issue an order on the item and target the
location the mouse was clicked.
If what you say is true (that you cant change the cursor via triggers - makes sense) then do you think you could create a dummy target ability (that has that targeting cursor) that would do the same ?
Kind of like :
-Player presses dialog buttons -> dummy ability on (you currently see that cursor) -> player clicks on the ground and sends (x,y) position to the item trigger ?
I'm gonna try this later when I work on my map :) Hopefully it will work!
You can't change the action your cursor is performing, (which is related to most things like the spell ui appearing), but given how much you can change the user UI, you could probably get a custom targeting cursor to appear in place of the mouse cursor, indicating you had really better click to use the ability.
You cannot, via triggers or an issue order effect, issue orders for abilities with multiple targeting phases to a unit. This includes use item and drop item, as those abilities first require selecting an item, then a location. It's a rather severe limitation in the game engine.
It wouldn't work directly. He wants to 'let the player select the location to throw the missile'. That sounds like he wants a targeting cursor to let the player know they need to aim it, though I'm not positive. You can't simulate clicking an item once to bring up the crosshair, and the having the player make the second click to throw it. You can register normal player clicks, but there's probably no clear indication then that they're aiming anything.
I'm not talking about the library I'm talking about the OrderSetTargetItem function which the library defines as a native action in the GUI and does not have any implementation code for, and which most of the library is essentially a wrapper for.
I'm not talking about the library I'm talking about the OrderSetTargetItem function which the library defines as a native action in the GUI and does not have any implementation code for, and which most of the library is essentially a wrapper for.
Hmm, so in theory it should be possible to have a custom UI button press cause the user to pick a target? Any suggestions on how to use this?
Ahh nevermind, nothing special really going on here, the only reason it works is because of the built in functionality of the inventory ability type. At least it will get me out of trouble for now, but still no closer to a fully custom UI being possible at this stage.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello everyone, I've pretty much browsed all the current threads on this subject... I've tried that item library...without any luck...
So I was wondering if there was anyone who had found a solution to **"immitate" clicking on an item icon that is in the unit's inventory** via triggers.
Basicly, I'm trying to set up a trigger that fires when a player clicks on a dialog button, and it will let the player select the location to throw the missile.
All kind of help appreciated!
Thanks,
-Koro
bump
You're referring to the library that I helped with, right? It should be able to handle this
From what I understand of your problem, you're not going about it correctly. You can't use triggers to 'click' an item once and get a targeting cursor. I don't believe triggers let you modify the player's cursor like that.
You can click the dialog button, then register a "mouse is clicked" event, and use the library to issue an order on the item and target the location the mouse was clicked.
If what you say is true (that you cant change the cursor via triggers - makes sense) then do you think you could create a dummy target ability (that has that targeting cursor) that would do the same ?
Kind of like :
-Player presses dialog buttons -> dummy ability on (you currently see that cursor) -> player clicks on the ground and sends (x,y) position to the item trigger ?
I'm gonna try this later when I work on my map :) Hopefully it will work!
I think I might have made a mistake.
You can't change the action your cursor is performing, (which is related to most things like the spell ui appearing), but given how much you can change the user UI, you could probably get a custom targeting cursor to appear in place of the mouse cursor, indicating you had really better click to use the ability.
I have no idea if this is similar to what you want, since I can't watch the videos, but this topic claims to have a unique targeting method. http://forums.sc2mapster.com/resources/trigger-libraries/11481-library-realtime-mouse-tracking-system/#posts
@A52BcE: Go
Still doesnt work... plus you can't even order a unit to use a "target" ability via triggers :'(
Of course you can.
You probably don't see the section in the triggers that says "issue order with no target" that you can change.
You cannot, via triggers or an issue order effect, issue orders for abilities with multiple targeting phases to a unit. This includes use item and drop item, as those abilities first require selecting an item, then a location. It's a rather severe limitation in the game engine.
@RileyStarcraft: Go
Please play this map and then tell me that again. http://static.sc2mapster.com/content/attachments/6/184/TheItemHarvest.SC2Map
@A52BcE: Go
Well that item is a throw type. Would that do the magic?
Well I stand corrected. Is OrderSetTargetItem an undocumented native? Pretty sneaky.
@Xolsom: Go
It wouldn't work directly. He wants to 'let the player select the location to throw the missile'. That sounds like he wants a targeting cursor to let the player know they need to aim it, though I'm not positive. You can't simulate clicking an item once to bring up the crosshair, and the having the player make the second click to throw it. You can register normal player clicks, but there's probably no clear indication then that they're aiming anything.
@RileyStarcraft: Go
Its not a native, ZyphreRZO made it, and he doesn't advertise his awesome library enough so I do it for him. http://forums.sc2mapster.com/resources/trigger-libraries/5636-library-galaxy-item-utility-library/
Its not a native, ZyphreRZO made it, and he doesn't advertise his awesome library enough so I do it for him. http://forums.sc2mapster.com/resources/trigger-libraries/5636-library-galaxy-item-utility-library/
---
I'm not talking about the library I'm talking about the OrderSetTargetItem function which the library defines as a native action in the GUI and does not have any implementation code for, and which most of the library is essentially a wrapper for.
Hmm, so in theory it should be possible to have a custom UI button press cause the user to pick a target? Any suggestions on how to use this?
Ahh nevermind, nothing special really going on here, the only reason it works is because of the built in functionality of the inventory ability type. At least it will get me out of trouble for now, but still no closer to a fully custom UI being possible at this stage.