I want to add some custom interface buttons that let you use some abilities. So you click on a dialog button and are prompted where to cast a spell.
As far as I know this isn't possible without using the new mouse movement event. There used to be no way to initiate an ability from a trigger where it would prompt you for a cast location.
So if I do this with mouse move events (per player) is it going to lag lots? I can turn the mouse move event on/off as required, but worst case being a 6v6 game there is technically a possibility that 12 players will be using this type of ability at the same time (probably unlikely most of the time).
I believe that would lag a lot online. Also, something like this could have been done without the mouse moved event. But if you did it without the mouse mved event and instead used the mouse click event and then called the world position of the mouse click, you could get a similar effect, just without a texture on the ground showing you where the spell will affect. Also, events like mouse clicked and key pressed tend to lag in Battle.net, so it does what you want it to do a slight bit of time after you actually press the button. However, if you really need to do this, I would have a mouse tracking trigger for each player which is initially off and gets turn on whenever a player does something requiring mouse tracking so that, in most cases, not many people are using mouse tracking at one time.
I think he means the targeting UI, where your mouse changes and you have a field or cross to choose the target. This can't be triggered to by knowledge. Ordering abilities to a point works, yes.
I think he means the targeting UI, where your mouse changes and you have a field or cross to choose the target. This can't be triggered to by knowledge. Ordering abilities to a point works, yes.
yes but if hes worried about lag theres no reason not to do it that way, you can easily check if it was in range, and theres lots of other nifty ways to fake the look. and he just said "click it, and be promoted to cast the spell", what I did, was when a user clicks abutton to cast the spell, I turned added a actor with a picture over the unit to show that your going to be casting a spell on click, you can also do something like that with an image on the screen,
if he needs the range of the spell, for example a nuke. once the user clicks, it could then put down an area graphic so the use knows what it will hit.. here you can put up a dialog box "confirm?" or even not but up a dialog box and look for a key to be hit to cancel it... lots of work arounds.
but to be honest I dont think theres realy that much lag in the first method for doing so simple with it that itll be a problem.
Yeah I know you can do it on click, or even the method I'm currently using which involves inventory items. But they are both a bit flakey and not ideal.
I'll try with the mouse move event first since the abilities i'm using it for aren't the sort that are used often, so it might be allright.
Actually on that note, is it possible to use an inventory item from a trigger? If so what happens if that item was an ability item that requires a target? Will have to see if that is possible.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi all,
I want to add some custom interface buttons that let you use some abilities. So you click on a dialog button and are prompted where to cast a spell.
As far as I know this isn't possible without using the new mouse movement event. There used to be no way to initiate an ability from a trigger where it would prompt you for a cast location.
So if I do this with mouse move events (per player) is it going to lag lots? I can turn the mouse move event on/off as required, but worst case being a 6v6 game there is technically a possibility that 12 players will be using this type of ability at the same time (probably unlikely most of the time).
Thoughts?
I believe that would lag a lot online. Also, something like this could have been done without the mouse moved event. But if you did it without the mouse mved event and instead used the mouse click event and then called the world position of the mouse click, you could get a similar effect, just without a texture on the ground showing you where the spell will affect. Also, events like mouse clicked and key pressed tend to lag in Battle.net, so it does what you want it to do a slight bit of time after you actually press the button. However, if you really need to do this, I would have a mouse tracking trigger for each player which is initially off and gets turn on whenever a player does something requiring mouse tracking so that, in most cases, not many people are using mouse tracking at one time.
Yeah, I'm going to give it a go and see how it works. Most of the time all mouse tracking will be off.
It's annoying that we can't initiate targeted abilities from triggers, would save the need to do this at all.
yes you can. simply case the ability at point, pointx = mouseClickX pointy = mouseClickY
I think he means the targeting UI, where your mouse changes and you have a field or cross to choose the target. This can't be triggered to by knowledge. Ordering abilities to a point works, yes.
yes but if hes worried about lag theres no reason not to do it that way, you can easily check if it was in range, and theres lots of other nifty ways to fake the look. and he just said "click it, and be promoted to cast the spell", what I did, was when a user clicks abutton to cast the spell, I turned added a actor with a picture over the unit to show that your going to be casting a spell on click, you can also do something like that with an image on the screen,
if he needs the range of the spell, for example a nuke. once the user clicks, it could then put down an area graphic so the use knows what it will hit.. here you can put up a dialog box "confirm?" or even not but up a dialog box and look for a key to be hit to cancel it... lots of work arounds.
but to be honest I dont think theres realy that much lag in the first method for doing so simple with it that itll be a problem.
Yeah I know you can do it on click, or even the method I'm currently using which involves inventory items. But they are both a bit flakey and not ideal.
I'll try with the mouse move event first since the abilities i'm using it for aren't the sort that are used often, so it might be allright.
Actually on that note, is it possible to use an inventory item from a trigger? If so what happens if that item was an ability item that requires a target? Will have to see if that is possible.