Staredit Network > Forums > SC2 Assistance > Topic: Using Dialogs for a Shopping Menu
Using Dialogs for a Shopping Menu
Jul 12 2013, 1:35 am
By: GoGo SpaceMan  

Jul 12 2013, 1:35 am GoGo SpaceMan Post #1



So on making a map where you buy units, is making a shop operable only with dialogs efficient at all?

Like, you press a small button above the Command Card and a dialog box opens over your screen with buttons (each one being a "purchase this unit" kind of button) and then you press the button again to Hide the dialog when you're done shopping?

My question is: Is doing this any more efficient than just using a building that each player can train a unit from?
(I realize it would probably take much more time creating a Shopping dialog, but that's not really the question)

Thank you!



None.

Jul 15 2013, 7:43 pm Roy Post #2

An artist's depiction of an Extended Unit Death

The advantage of using the command card is that you can easily use hotkeys: serious players would not want to have to point and click for basic operations that could be handled by tapping a key (you could bind the dialog open/close and its options to hotkeys, but this may feel clunky in practice). There's also the factor of visibility: if players need to see what's going on while they're making these decisions, having a dialog placed over their field of view could hamper them.

The disadvantage of using the command card is presentation: you're limited to an icon to represent the option, and the player would have to hover over it to see what it actually is. With custom icons, you can make this a better experience, but it still won't be immediately apparent to newer players what all their options are upfront. There's quite a bit of customization you can do with dialog windows that isn't available for the command card. And finally, there's the factor of limitation: the command card can only support up to 20 options at a time, whereas a dialog can fit much more, and a dialog can represent paging much better than a command card can. Though a bulky dialog may not be better than an exhausted command card.

If you plan for your game to be highly competitive and have a learning curve, or if your game is generally fast-paced, using the command card will most likely be your best option. If you're making a cooperative game, or if it's a slower-paced game (such as a turn-based strategy game), or if you want it to be very friendly to newer players, then a dialog may prove to serve your purposes better.




Jul 16 2013, 4:06 am GoGo SpaceMan Post #3



Ahhhh, thank you.

I am fairly new to map-making, and I'm just curious: Is there a way to have a building OFF of the map but hotkey'd so you can use a command card for shopping, but not have a building on the map? It's mostly an art thing: I don't really like having a building on the floor.

If not: I can simply make something like a Xel-Naga WatchTower be capable of spawning units, right? (Clearly aesthetic, I don't mean to have the watch-tower in the middle of the map and spawning units. I just don't want to use, say, a Barracks in the spawning-area for shopping.)



None.

Jul 16 2013, 10:51 am Devourer Post #4

Hello

You can create a building "outside the map".
Have a decent mapsize, and via triggers, you are able to set something similar to "set playable area" (something under gameplay or camera, ain't to sure right now, but you will find out quite fast, if not, I can help you.).
Thus, have, for example, a 128x128 map, place the barracks on the very right of the map, then place a location which represents the actual gaming area and chop the map to that location via triggers. Players only see that area, they cannot move their cameras outside, yet they have a barracks outside hotkey'd (which can be done via triggers).

Another method, via the data-editor, is to have the Barracks on the map, but make it either invisible, very small or remove it's model, thus only a green selection cycle (which can be removed somehow, I guess) would be visible to the players. Pathing can be edited via footprints, though, personally, I have very bad experience with footprint editing ^.^

However, either way should work.



Please report errors in the Staredit.Network forum.

Jul 16 2013, 12:43 pm GoGo SpaceMan Post #5



Ah! Thanks!

So there's a unit-spawn area where I'm planning on having the units go when you buy them.
If I were to have a hotkey'd building outside of the playable map and you were to train this unit ("buy" that unit), it is possible to have that unit appear in the spawning area? Or would I have to use a trigger that would move all units nearby the hotkey'd building to the spawning-area?



None.

Jul 16 2013, 1:15 pm Devourer Post #6

Hello

From my knowledge, only doable by trigger or when using the data-editor, however, the latter would require quite alot work which might not be that understandable for beginners!
So I'll give you an idea on how to create the trigger (one variant, which I'm now writing without looking at the editor, but which should work without problems):
Locations required: 2: 1: Spawning area (where they have to be teleported after purchased) and Purchasing area (a location around all the barracks, not accessible to normal units (which is the case, since you reduced the playable mapsize)).

Event: Unit enters/leaves location -> "Any Unit" enters "Purchasing area"
Condition: Not required for your needs.
Actions: Move unit instantly -> Move "Triggering unit" to "Spawning area".



Please report errors in the Staredit.Network forum.

Jul 16 2013, 1:20 pm GoGo SpaceMan Post #7



Thank you so much!

I'm going to assume there is also a trigger that can keep this "Barracks" hotkey'd at all times, even if you try to override it?



None.

Jul 16 2013, 1:29 pm Devourer Post #8

Hello

No problem, glad I can help.

Yes, actually quite easy. Just as assumed, we need a trigger for this, but the event (you can have multiple events on a trigger btw, the trigger then fires whenever at least one of them occured) can vary. One method is to automatically - no matter what - re-hotkey your barracks every 5 second (5 seconds is just a number, you can use whatever you want, however having many periodic triggers which fire rapidly like every 0.5 seconds can cause maplags, if there are too many actions executed)

Event: Periodic event -> Every 5 game Seconds
Event: Map initialization
Conditions: Once again, not required for your needs.
Action: Clear Control Group -> Clear Controlgroup "1" for player "1"*
Action: Add Unit to Control Group -> Add "Barracks" to Controlgroup "1" for player "1"**

This trigger will be triggered at second 0 (Map initialization) and then every 5 game seconds. It will clear the hotkeygroup 1 for player 1 and bind the barracks in it afterwards.

* the values "1" and player "1" are just guessed by me. You probably need this and some copies for other players as well.
** To get "Barracks" you click on the unit-parameter and then on "Value" on the newly popped window. Then you can click on the "Choose..."-button to directly select that barrack. Makes it easier.




Please report errors in the Staredit.Network forum.

Jul 16 2013, 1:31 pm GoGo SpaceMan Post #9



Alright, I'm all set!

Your advice/help has been greatly appreciated. Thanks!



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[01:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
Please log in to shout.


Members Online: Roy