clicking a dialog button can cause events to fire, yes. the event is somthing like "any player uses dialog item". There are many tutorials out there on making dialogs but the short answer is you would make a dialog window with dialog items in it that are attached to global variables. This will be the initial trigger that should run at what i suspect would be your mapinitialization.
Then you would want to create a new trigger that will fire when a dialog item is used. you will use a if-then-else and the global variables to verify which button was pressed and thus what order to give.
It sounds like your new to dialogs so i strongly recommend you find a nice video tutorial.
1) Be able to use command card and hotkey (And thus targetting). While the interface is hidden?
2) Just use a Key Pressed event to launch a spell. Knowing there no way without some lag to get the mouse targetting in operation. (At least that I know of).
I will help you with the 2) cause its pretty easy to do. Your behavior workaround could work but dunno about performance.
Here a good start.. Press W or just use the marine spell.
I added a horrible paint document of how Y/X work, just read about Sin/Cos/Tan in mat if you want more detail about it.
Wow thanks thats really kind =) the second one is what i was looking for, even tho the first solution would work too as the ability is not targeted.
But I have it working already, so I wont change things anymore if not necessary.
I recognized that trigger performance for key events is sufficient.
I just add a behavior to the triggering players unit (theres only per player) that creates a persitent and launches a missile straight forward.
Problem i stated above (missile going into random directions) was because i set an offset in the launch missile effect. i removed it and set an offset in the Create Persistent effect instead, with initial Offset being the range of the projectile.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello!
im trying to make a unit use an ability when you hit a certain key (trigger event key down).
I have the Interface hidden, so i can not use the ability via hotkeys.
Anyone who knows how to make the unit use the ability in a scenario like this?
Dialogs.
make a dialog with appropriate buttons. the dialog items would then trigger actions for selected units.
That would deliver the "event" for my trigger right?
I do have an event for what i try to do but i dont know what actions to use to make the unit use the ability.
clicking a dialog button can cause events to fire, yes. the event is somthing like "any player uses dialog item". There are many tutorials out there on making dialogs but the short answer is you would make a dialog window with dialog items in it that are attached to global variables. This will be the initial trigger that should run at what i suspect would be your mapinitialization.
Then you would want to create a new trigger that will fire when a dialog item is used. you will use a if-then-else and the global variables to verify which button was pressed and thus what order to give.
It sounds like your new to dialogs so i strongly recommend you find a nice video tutorial.
I used dialogs before ;) but this is not what i need.
I dont need an event that runs the trigger, i need a way to tell a unit to use an ability within a running trigger ;) im looking for an action
Ok i got a workaround, im adding a behaviour to my unit when a determined key is pressed, behavior has a launch missile effect.
Now im facing some troubles with missiles flying into random directions :\
A quick question.. What do you want?
1) Be able to use command card and hotkey (And thus targetting). While the interface is hidden?
2) Just use a Key Pressed event to launch a spell. Knowing there no way without some lag to get the mouse targetting in operation. (At least that I know of).
I will help you with the 2) cause its pretty easy to do. Your behavior workaround could work but dunno about performance.
Here a good start.. Press W or just use the marine spell.
I added a horrible paint document of how Y/X work, just read about Sin/Cos/Tan in mat if you want more detail about it.
Wow thanks thats really kind =) the second one is what i was looking for, even tho the first solution would work too as the ability is not targeted. But I have it working already, so I wont change things anymore if not necessary.
I recognized that trigger performance for key events is sufficient. I just add a behavior to the triggering players unit (theres only per player) that creates a persitent and launches a missile straight forward.
Problem i stated above (missile going into random directions) was because i set an offset in the launch missile effect. i removed it and set an offset in the Create Persistent effect instead, with initial Offset being the range of the projectile.