below have I attached three pictures to illustrate what I am trying to achieve.
First of all, is this possible at all to create in the trigger editor? Or what parts of it might be possible to do? Is this unrealistic? What are potential flaws - lag, interface issues?
I might as well ask this too - I rarely use triggers in my maps, so I am not that skilled with the trigger editor. I almost always build everything in the data editor. I would appreciate if someone here could give me a helping hand by uploading a test map with a framework for a trigger (in case there even is a solution!)
Edit: The system does not have to look or work exactly like on the pictures. The point is that I am looking for a way for players to produce workers, without having a specific unit or structure on the battlefield that produces them.
I made a thread about it in the data editor-forum a while ago, discussing potential workarounds (such as using an invisible dummy hero).
I explain the concept (in more detail, compared to my earlier thread) here in the trigger forum to hear if people have any ideas of workarounds using triggers
You could potentially do a workaround using dialogs and a custom ability system made completely in triggers, but this would probably lag as hell, especially with more than 2 players.
I guess the best method would indeed be a data approach (Dummy Unit with said ability) with use of the UI Editor (moving the ability button to the top left if that is possible)
I am playing around with the data solution, but there are some issues with it. (That's why I am also looking for trigger solutions - hence making a thread here to get input and ideas from people skilled at triggering)
Let's say that each player starts with an invisible dummy hero, depending on the race they play. Each "hero" has an ability to calldown workers on the battlefield. There is an icon that players can click on to always select the dummy hero, and then use an ability to calldown workers.
Two issues with data:
1. Players can focus the camera on the dummy unit by clicking on the portrait or double clicking on the icon. I don't want players to be able to focus on it, since the dummy hero is not "supposed" to exist as a unit on the battlefield. Plus it might be annoying in a high pace game - accidentally double clicking on the dummy hero icon to calldown workers, and suddenly the camera jumps away to a remote location of the map.. (where the invisible dummy hero is)
2. It would be nice if players could always see on the screen the cooldown of their Calldown worker-ability. (For example, as on picture #3 in my opening post) Otherwise they need to select the dummy hero often, just to check for the ability cooldown and the available charges in the command cards menu. (This is not a huge issue though, but it might be little annoying, given the context of my mod)
Not sure if triggers could overcome these issues, in some way. (One suggestion is to use a "key clicked trigger" or a custom made dialog button players click on, that selects the hero.) Of if there are better solutions/workarounds.
Basically, I am looking for a way for players to produce workers, without having a specific unit or structure on the battlefield that produces them.
How about giving your dummy hero no collision, and moving it instantly to the objective of the player's camera with a periodic event (or when it's selected)? If the player double clicks on it, the camera wouldn't move, but he/she would lose the space function to jump to the last event location.
The calldown effect can be achieved easily with dialogs. You would just need a .dds image for each frame, and a loop switching it after it's used until it's usable again.
You mean that the space function would overall be disabled/limited throughout the game due to this, or just when the player is selecting the dummy hero?
you could use a normal button and use current position of the camera as target for your ability. all other things will be either laggy, not handy or anything else. cooldown could be indeed shown on the button itself, the button must have been created with ui-editor and then hooked and saved in a variable to detected if this button was clicked. the button must be made of the gameButtonTemplate, the frame <Frame type="Image" name="CooldownFinishedImage"> constrols the cooldown behaviour.
Only after selecting the dummy hero. Notice that you would have to displace it by 1,75 squares on the y axis, and due latency it wouldn't be perfectly fluid
@Displaying the cooldown on a button on the screen
Thanks Cacho56 and Funky! Good to know that it can be done! My first priority though is to get the actual ability to work in a smooth way for players, without lags, bugs or interface problems. Then will I try to display the cooldown on the screen, which will probably be more convenient for players.
@ "you could use a normal button and use current position of the camera as target for your ability."
Would you mind to elaborate on this a bit more? Seems interesting.
@Cacho56
Any other potential advantages or disadvantages with your suggestion, that you can think of?
(Yes yes I know I ask a lot of follow-up questions, but I am just eager to hear good ideas for solutions!
Creating the dummy heroes and the calldown abilities will be very easy. Just need to find a good way for players to have access to the abilities in the interface.)
current camera position of player is a function that returns a point. now you only need to check if that point is pathable (if not get closest pathable point) and run your effect chain at that point.
Let's say that the trigger moves the invisible dummy hero to the location of a players camera every 1 second. Basically, players would have an invisible dummy unit in front of their screen the entire game, and if they double click on it then the camera would focus kinda where they already have the camera.
1. If players drag their mouse and select units on the battlefield, would the dummy unit run a risk of being selected too? (Cause if it is flagged as "unselectable", then it can't be selected at all)
2. If they select their dummy hero via the hero button, would they be able to group it in a cntrl-group together with other units?
(Both situations would "reveal" for players that there is a dummy unit + mess up their interactions with normal units)
@Funky
"you could use a normal button and use current position of the camera as target for your ability. /.../ current camera position of player is a function that returns a point. now you only need to check if that point is pathable (if not get closest pathable point) and run your effect chain at that point."
So a player would not use Calldown SCV and target a specific location on the screen? Instead, when the ability is activated, it calldowns a SCV at the point where the player has the camera?
So a player would not use Calldown SCV and target a specific location on the screen? Instead, when the ability is activated, it calldowns a SCV at the point where the player has the camera?
The first issue shouldn't be a problem if the unit hasn't collision, has an invisible actor and is invulnerable (with high hp and regeneration just in case).
About the control groups, you could remove it from them in the same periodic event that moves it to the camera target (for each player and for each integer from 1 to 10, if the unit is in the control group, remove it from it). It would stay in the group for the 1/32 sec that the periodic event takes to be launched. If the unit had a low selection priority, it wouldn't be even noticed.
Ok, would it still be necessary to have a dummy hero, or can this be done via a dialog button in the corner? (when a player clicks on it or clicks a specific key, a worker is calldowned at a point at the current camera location.. so players do not have to choose a specific target.. )
you have to do it with UI-editor and use the gamebuttontemplate. then you are able to hook it up and set its picture and cooldown. i am not sure if its possible to get a cooldown animation for trigger based dialog buttons (requires some testing which i dont want to do)
There's an example of a dialog type cooldown in the HoTS swarm host mission. They basically use the enable/disable dialog item action and then throw in some custom text that is hooked up to a loop/timer.
Not sure how relevant this still use, but ehre is an invisible warpgate unit that pretty much serves a similar purpose to what you are trying to achieve.
StarCraft II 3.0 allows you to force a unit ability order for a player to target without having to select the unit. At least that is what the native declaration implies.
Until then you might want to forgo the targeting and instead call it down at the nearest (to current camera target) safe point.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello,
below have I attached three pictures to illustrate what I am trying to achieve.
First of all, is this possible at all to create in the trigger editor? Or what parts of it might be possible to do? Is this unrealistic? What are potential flaws - lag, interface issues?
I might as well ask this too - I rarely use triggers in my maps, so I am not that skilled with the trigger editor. I almost always build everything in the data editor. I would appreciate if someone here could give me a helping hand by uploading a test map with a framework for a trigger (in case there even is a solution!)
Here is the mod I am working on: http://www.teamliquid.net/forum/sc2-maps/478211-nonamemod This trigger will be used as part of a new economic system that I am curious to test.
Anyway, see the pictures below!
Edit: The system does not have to look or work exactly like on the pictures. The point is that I am looking for a way for players to produce workers, without having a specific unit or structure on the battlefield that produces them.
this really has been asked a 1000 times. you cannot create any dialog with targets yet, maybe in lotv.
I made a thread about it in the data editor-forum a while ago, discussing potential workarounds (such as using an invisible dummy hero).
I explain the concept (in more detail, compared to my earlier thread) here in the trigger forum to hear if people have any ideas of workarounds using triggers
You could potentially do a workaround using dialogs and a custom ability system made completely in triggers, but this would probably lag as hell, especially with more than 2 players.
I guess the best method would indeed be a data approach (Dummy Unit with said ability) with use of the UI Editor (moving the ability button to the top left if that is possible)
Thanks for your reply.
I am playing around with the data solution, but there are some issues with it. (That's why I am also looking for trigger solutions - hence making a thread here to get input and ideas from people skilled at triggering)
Let's say that each player starts with an invisible dummy hero, depending on the race they play. Each "hero" has an ability to calldown workers on the battlefield. There is an icon that players can click on to always select the dummy hero, and then use an ability to calldown workers.
Two issues with data:
1. Players can focus the camera on the dummy unit by clicking on the portrait or double clicking on the icon. I don't want players to be able to focus on it, since the dummy hero is not "supposed" to exist as a unit on the battlefield. Plus it might be annoying in a high pace game - accidentally double clicking on the dummy hero icon to calldown workers, and suddenly the camera jumps away to a remote location of the map.. (where the invisible dummy hero is)
2. It would be nice if players could always see on the screen the cooldown of their Calldown worker-ability. (For example, as on picture #3 in my opening post) Otherwise they need to select the dummy hero often, just to check for the ability cooldown and the available charges in the command cards menu. (This is not a huge issue though, but it might be little annoying, given the context of my mod)
Not sure if triggers could overcome these issues, in some way. (One suggestion is to use a "key clicked trigger" or a custom made dialog button players click on, that selects the hero.) Of if there are better solutions/workarounds.
Basically, I am looking for a way for players to produce workers, without having a specific unit or structure on the battlefield that produces them.
This isn't a perfect solution, but could work:
How about giving your dummy hero no collision, and moving it instantly to the objective of the player's camera with a periodic event (or when it's selected)? If the player double clicks on it, the camera wouldn't move, but he/she would lose the space function to jump to the last event location.
The calldown effect can be achieved easily with dialogs. You would just need a .dds image for each frame, and a loop switching it after it's used until it's usable again.
Check out my kitbashes! Custom Campaign Initiative: Lots of great Custom Campaigns!! Check out and Support!!
Nice ideas!
You mean that the space function would overall be disabled/limited throughout the game due to this, or just when the player is selecting the dummy hero?
you could use a normal button and use current position of the camera as target for your ability. all other things will be either laggy, not handy or anything else. cooldown could be indeed shown on the button itself, the button must have been created with ui-editor and then hooked and saved in a variable to detected if this button was clicked. the button must be made of the gameButtonTemplate, the frame <Frame type="Image" name="CooldownFinishedImage"> constrols the cooldown behaviour.
@Kabelkorven: Go
Only after selecting the dummy hero. Notice that you would have to displace it by 1,75 squares on the y axis, and due latency it wouldn't be perfectly fluid
Check out my kitbashes! Custom Campaign Initiative: Lots of great Custom Campaigns!! Check out and Support!!
@Displaying the cooldown on a button on the screen
Thanks Cacho56 and Funky! Good to know that it can be done! My first priority though is to get the actual ability to work in a smooth way for players, without lags, bugs or interface problems. Then will I try to display the cooldown on the screen, which will probably be more convenient for players.
@ "you could use a normal button and use current position of the camera as target for your ability."
Would you mind to elaborate on this a bit more? Seems interesting.
@Cacho56
Any other potential advantages or disadvantages with your suggestion, that you can think of?
(Yes yes I know I ask a lot of follow-up questions, but I am just eager to hear good ideas for solutions!
Creating the dummy heroes and the calldown abilities will be very easy. Just need to find a good way for players to have access to the abilities in the interface.)
current camera position of player is a function that returns a point. now you only need to check if that point is pathable (if not get closest pathable point) and run your effect chain at that point.
@Kabelkorven: Go
Nope, that's just all that comes to my mind.
Check out my kitbashes! Custom Campaign Initiative: Lots of great Custom Campaigns!! Check out and Support!!
@Cacho56
Let's say that the trigger moves the invisible dummy hero to the location of a players camera every 1 second. Basically, players would have an invisible dummy unit in front of their screen the entire game, and if they double click on it then the camera would focus kinda where they already have the camera.
1. If players drag their mouse and select units on the battlefield, would the dummy unit run a risk of being selected too? (Cause if it is flagged as "unselectable", then it can't be selected at all)
2. If they select their dummy hero via the hero button, would they be able to group it in a cntrl-group together with other units?
(Both situations would "reveal" for players that there is a dummy unit + mess up their interactions with normal units)
@Funky
"you could use a normal button and use current position of the camera as target for your ability. /.../ current camera position of player is a function that returns a point. now you only need to check if that point is pathable (if not get closest pathable point) and run your effect chain at that point."
So a player would not use Calldown SCV and target a specific location on the screen? Instead, when the ability is activated, it calldowns a SCV at the point where the player has the camera?
exactly
@Kabelkorven: Go
The first issue shouldn't be a problem if the unit hasn't collision, has an invisible actor and is invulnerable (with high hp and regeneration just in case).
About the control groups, you could remove it from them in the same periodic event that moves it to the camera target (for each player and for each integer from 1 to 10, if the unit is in the control group, remove it from it). It would stay in the group for the 1/32 sec that the periodic event takes to be launched. If the unit had a low selection priority, it wouldn't be even noticed.
Check out my kitbashes! Custom Campaign Initiative: Lots of great Custom Campaigns!! Check out and Support!!
Ok, would it still be necessary to have a dummy hero, or can this be done via a dialog button in the corner? (when a player clicks on it or clicks a specific key, a worker is calldowned at a point at the current camera location.. so players do not have to choose a specific target.. )
you have to do it with UI-editor and use the gamebuttontemplate. then you are able to hook it up and set its picture and cooldown. i am not sure if its possible to get a cooldown animation for trigger based dialog buttons (requires some testing which i dont want to do)
@FunkyUserName: Go
There's an example of a dialog type cooldown in the HoTS swarm host mission. They basically use the enable/disable dialog item action and then throw in some custom text that is hooked up to a loop/timer.
Not sure how relevant this still use, but ehre is an invisible warpgate unit that pretty much serves a similar purpose to what you are trying to achieve.
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
StarCraft II 3.0 allows you to force a unit ability order for a player to target without having to select the unit. At least that is what the native declaration implies.
Until then you might want to forgo the targeting and instead call it down at the nearest (to current camera target) safe point.