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:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Burlagn06, Roy