• 0

    posted a message on How to use a RECORD as Custom Action's parameter?

    I'm trying to right a custom action to swap all of the info for 2 items in my RPG game.  Every item is a record.  For example, the Inventory - Helm Slot variable (item) is
    type: -Record
    record: Item Record - Armor

    The record then holds all of the info, such as the item's image, description, stats, name, tier, etc.  I know i just need to take the two items to swap as parameters and make a var "temp", then set temp = parameter1, parameter1 = parameter2, and parameter2 = temp, but when I try to allow parameters of type record, it's not there.  The only options with a dash at the beginning are Preset, Game Link, and File

    Thanks for your help!

    Posted in: Triggers
  • 0

    posted a message on How to show these buttons as "highlighted" or "selected"
    Quote from MasterWrath: Go

    @PerAnimus: Go

    I don't think that you could. I'm not fully sure I understand how you intend to do this. How are they supposed to click the button if they can't move the mouse to it? That's a question you have to answer, I don't know. Maybe while the dialog is open enable a trigger that allows them to move through the buttons using the arrow keys.

    Edit: Ah, you're using a controller. I know even less then.

    alright, then the 2nd solution it is! Thanks :)

    EDIT: Actually I'm having trouble tinting the Dialog Item (Image)s to be darker. What action should I be using?

    Posted in: Triggers
  • 0

    posted a message on How to show these buttons as "highlighted" or "selected"
    Quote from MasterWrath: Go

    @PerAnimus: Go

    I can conceive of two ways to solve your problem with the image buttons.

    The first would be to shrink the images so that the buttons behind them are actually visible. Then you can make them appear to select by having a trigger where, when the button is pressed, the image of the button (not the icon but the button itself) is changed to a brighter image.

    The other way you could do it would be to initially tint all of the icon images darker using Dialog Item - Set Property As Color, with a color of something like (150, 150, 150). Then, have a trigger where, when the button is pressed, the you tint the color of the icon image back to a color of (255, 255, 255).

    This works because the default color of an image is (255, 255, 255), so by tinting it to (150, 150, 150), you are making it darker, which means you can tint it back up to (255, 255, 255) to make it appear brighter.

    I thought about the first solution, but the 2nd I didn't know I could do! It seems like a pretty simple solution - I'd just make a "select UI button(dialog item button)" custom action and a deselect one. However out of curiosity, if I was to just shrink the images so the button's green color showed like solution 1, how could I "mouse over" the button to light it up, without ever moving the mouse?

    Posted in: Triggers
  • 0

    posted a message on How to show these buttons as "highlighted" or "selected"

    I'm making a demo for a game I eventually plan to make in Unity as a standalone game, and the main form of input is with a controller. Thankfully I'm using JoyToKey with my PS4 controller to emulate this in StarCraft 2, but one thing I'm not sure how to do is show which dialog button is currently selected when navigating menus.

    I know when moused over - IF THERE IS NO IMAGE - the button will get brighter. However some of my dialog item (button)s have dialog item (image)s on top of them. So is there any way that i may be forgetting that I can show these buttons as "currently selected" other than importing a 2nd set of images, slightly modified with some form of indication on them? And for buttons without images on top of them, how could I show them as "currently selected" without the mouse ever moving (because Mouse-Camera mode is locked on)

    Here's a couple pictures for reference (with then without images on top of the buttons):

    http://i.imgur.com/4dJkKd2.jpg

    http://i.imgur.com/0IsYThI.jpg

    Posted in: Triggers
  • 0

    posted a message on Show non-alphanumeric characters in chat?

    Awesome thanks :)  Now I just have to figure out how to make a triangle/delta symbol.  Alt+254 works well for a square (■)

    Posted in: General Chat
  • 0

    posted a message on Show non-alphanumeric characters in chat?

    Is there any way to show abnormal characters, such as a Square, Triangle/Delta sign, Directional arrows, etc in Strings or Texts?

    Posted in: General Chat
  • 0

    posted a message on Is there ANY form of controller support?

    Alright I got my controller and downloaded JoyToKey, and it works perfectly :)  FOR ANYONE ELSE TRYING TO DO THE SAME THING, here is the button map in JoyToKey:
    Stick 1 (for booleans of the 4 directions) is left analog
    Stick 2 (for booleans of the 4 directions) is right analog
    POV (for booleans of the 4 irections) is the D-Pad
    Button 1 - Square
    Button 2 - X
    Button 3 - Circle
    Button 4 - Triangle
    Button 5 - L1
    Button 6 - R1
    Button 7 - L2
    Button 8 - R2
    Button 9 - Share (LEFT start/select button)
    Button 10 - Options (RIGHT start/select button)
    Button 11 - Left Analog BUTTON
    Button 12 - Right Analog BUTTON
    Button 13 - Playstationeer button
    Button 14 - touchpad button

    Now if I can make the Joystick 2 directional booleans move my MOUSE in those directions, I'll be good to go
    EDIT: figured this out, and everything works perfectly!

    Posted in: General Chat
  • 0

    posted a message on Is there ANY form of controller support?
    Quote from SoulTaker916: Go

    No, we cant touch that stuff. its handled by blizzard.

    Joy to key is your best bet. Logitech controllers come with software which can use the mouse while 360 for PC does not. but theirs obscure mod out there which will force the buttons to keys.

    But none of this matters, If you make a controller compatible map, will players want to play it with a controller and set up the time to play it with a controller? Its not easy todo, it will confuse alot of players and its a hassle. you should abandon this line of thought.

    My intention is not to make a map for other people. I'm in the process of making my first official game for my game company, but I as a programmer don't have the ability to make shit for 3d models, animations, or art. However I'm already fairly familiar with the Galaxy Editor, so I'm using SC2's assets to make a demo for my first game which is already fully concepted, so I can show people what the game is like, how it plays, etc etc etc. Then once I have a playable form of the game to show people, I will use that to recruit a modeler, animator, artist, and whatever else I need so then we can go on and make the real game in Unity, where I already know how to use controller input. So this map will never be uploaded to the servers. But thanks for your warning :)

    Also, I've dabbled with the Logitech F310 a couple years ago when coding my high school's robot (in labview), and the 360 controller in Unity, but never vice versa so I didn't really get to see the difference if there is any. Other than the 360 controller having to install its own driver, what do you need to do differently between the two?

    EDIT: shen'd by vicboy

    Posted in: General Chat
  • 0

    posted a message on Is there ANY form of controller support?
    Quote from Vicboy: Go

    @PerAnimus: Go

    Well, I think I've done that once. Turn my controller to a keyboard+mouse with Mouse Input. Anyway, to have your SC2 game work with mouse input, use actions: Lock Camera Mouse Relative... and Turn Camera Mouse Rotation...

    Actually, JoyToKey was possibly what I used to turn analog stick input to mouse input.

    Awesome, thanks so much for the specifics :) I should be getting a controller later today, so I'll post back once I've had time to play around with it. (Don't know if it matters, but I'm buying a ps4 controller, and have access to my roommate's 360 controller)

    Posted in: General Chat
  • 0

    posted a message on Is there ANY form of controller support?
    Quote from Vicboy: Go

    I'm just guessing around here, but [what if] you find a program that turns controller inputs into keyboard inputs then have your SC2 game use the Key Pressed event?

    Thats what I was thinking, but I don't know about any of those programs or which ones are good/bad. I also dont know how to convert analog input to the MouseCamera control trigger. Was hoping someone here would know what programs to use and how

    Posted in: General Chat
  • 0

    posted a message on Is there ANY form of controller support?

    Hey guys, long story short, I'm using the Galaxy Editor to make a demo for a game I'm going to go on and make in Unity. The only problem is that the game is meant for a controller, so adapting it to mouse and keyboard can feel really weird at times. I haven't really followed anything starcraft 2 (game OR mapmaker) in the last 2 years due to League of Legends, but I doubt they wouldve added native controller support. However I know there are also programs out there like JoyToKey and what not.. So, is there any way to use a controller at all when developing a map?

    I just want to be able to use the left stick or Dpad for a 4 way boolean check (wasd), right stick for camera control (mouse camera control trigger), the 4 normal buttons, and the 4 tilt buttons as booleans (don't need them as axes)

    Posted in: General Chat
  • 0

    posted a message on Rounding a Real to one decimal place?
    Quote from DogmaiSEA: Go

    Convert to string > convert back to real.

    Melee Initialization
        Events
            Game - Map initialization
        Local Variables
            real = 0.0 <Real>
            string = "" <String>
        Conditions
        Actions
            Variable - Set real = 1.2569
            Variable - Set string = (String(real) with 2 decimal places)
            Variable - Set real = (Real(string))
            UI - Display (Text(real) with Any Precision decimal places) for (All players) to Chat area
    

    I already tried this :/ But nonetheless, copied yours EXACTLY and it doesn't work. Using the numbers:

    A) 2.9876

    B) 2.92

    C) 2.8744

    D) 2.2123

    E) 2.4236

    The results were:

    A) 2.99 instead of 3.0

    B) 2.9199 instead of 2.9

    C) 2.8701 instead of 2.9

    D) 2.1201 instead of 2.2

    E) 2.4199 instead of 2.4

    Posted in: Triggers
  • 0

    posted a message on Rounding a Real to one decimal place?

    Alright guys, I've tried everything I can think of and I'm extremely frustrated by this point. The problem is that EVERY TIME, the number ends up showing as 2.8999 or 4.0001 or whatever but I really just can't figure out how to get this to work :/ Tried Modulo, manually adding/subtracting like above, multiplying by 10, dropping off the decimal, and dividing by 10, converting to string and back, etc etc etc

    Posted in: Triggers
  • 0

    posted a message on Rounding a Real to one decimal place?
    Quote from DeltaV: Go

    Something like this also should work (Use Modulo (real) trigger):

    real mod;
    mod = n modulo 0.1;
    if (mod<0.05){
    	n = n-mod;
    }else {
    	n = n-mod+0.1;
    }
    

    That's how I would do it in normal, text-based code, but I never could figure out how to use % in the editor. How do I access it??

    Posted in: Triggers
  • 0

    posted a message on Rounding a Real to one decimal place?

    So from what I see, the editor only has a rounding function for reals that rounds it to 0 decimal places. I tried making a custom function to round Reals to ONE decimal place, by taking the number multiplying it by 10.0, rounding to 0 decimal places (using the native funct), then divide by 10.0, but that sometimes results in something like 2.0999999, and whenever I try to change "10.0" to "10.0000000", it auto-corrects it back to "10.0". So... how can I round to only ONE decimal place?

    Posted in: Triggers
  • To post a comment, please or register a new account.