• 0

    posted a message on Order unit to use inventory item?

    @Helral: Go

    Hmm..Ok.

    I made a new ability, "Use Item" with "Inventory" as an ability type. I set the commands so that "Item Instant" was the only available command. In the triggers, I made a new ability variable which combined my "Use" ability with the index so I could use it in the "Issue Order". The trigger tells the unit to use the "Use ability" targeting the inventory item.

    In game, I get the error "Use is missing a target"

    Edit: Sorry, I know I'm asking a lot of questions.. but most of my experience with the editor is from trial and error.. so I don't have a ton of understanding as to WHY some things work.. only that if I do them in a specific way, they will.

    Posted in: Triggers
  • 0

    posted a message on Order unit to use inventory item?

    This "use" ability is something I need to create? It doesn't seem available in the preset abilities.

    If I need to create it, what category is it under? "Inventory" ability just seems to be for setting it up, not interacting with it.

    Posted in: Triggers
  • 0

    posted a message on Order unit to use inventory item?

    If a unit has an item in their inventory, is there a way to tell them to use it through triggers?

    Posted in: Triggers
  • 0

    posted a message on Triggering Inventory Item Container returns an index. How do you reference that?

    Has no one ever used this?

    Figured it out. It uses the "Ability" data. Info.

    Only difference is it adds 1. If the index is 0, it uses 1. If it's 1, it uses 2, etc.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Triggering Inventory Item Container returns an index. How do you reference that?

    http://wiki.sc2mapster.com/galaxy/triggers/triggering-inventory-item-container/

    I'm looking for a way to get the value of the container that the item is in.

    The problem is, this function returns an INTEGER. Nowhere in the Data Module under "Item Containers" do I see anything about an index. How can I reference containers?

    Posted in: Galaxy Scripting
  • 0

    posted a message on [UI] Mapping Command Cards to the UI

    @tigerija: Go

    Is there any way to reference abilities? Like I said, for some reason the "Issue Command" action doesn't list custom ability commands..

    May have accidentally found a solution. When using "Issue command", it allows me to use a variable. So I created a variable for ability command.

    I guess there's a difference between an ability and an ability command. An ability command is an ability with an index (no idea what it's indexing).

    So when I set the variable, I can have it generate an ability command for me by adding the index to my ability.

    I think this will allow me to reference it in triggers.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Giving orders to an Entire Group

    @GaryFishFx: Go

    Do I detect a golems map? :-D

    Posted in: Galaxy Scripting
  • 0

    posted a message on [UI] Mapping Command Cards to the UI

    I have removed the whole game UI and I am assembling it again with a custom setup piece by piece.

    The problem comes in when I want to use a unit's ability VIA command card. The Command panel is hidden.. and just saying "Show command panel" doesn't work without the rest of the default UI (it's wouldn't work with it anyways).

    So now I have all my custom made abilities and no way to access them. I haven't found a way do it VIA triggers. There's the "Issue order" action, but it only shows generic stuff like "attack" and "move". My custom abilities don't show up there.

    Besides that, I need the little buttons to open/close my inventory.

    I've seen abilities mapped to custom UI's in videos, but they gave no indication on how it was done.

    Thanks, Jeremy

    Posted in: Galaxy Scripting
  • 0

    posted a message on Building completes trigger

    @MegatronXplo

    Events
    - Unit - Any Unit construction progress is Completed
    Conditions
    - (Triggering progress unit type) == Command Center
    Actions
    - Player - Modify player (Triggering player) Minerals: Add 400

    Think that will work

    Posted in: Galaxy Scripting
  • 0

    posted a message on Picking up Items

    @Majician21: Go

    What I found works is if you issue a command to the unit, and for the command go to "Preset", there's something called (I believe) "smart command". I had the same problem.. couldn't find a "puck up" or "use" or "interact".. but smart command seems to do it.

    So you just need to have a trigger that checks for a button or click, then issue the smart command to your unit. It will want to know what item you with to pick up, though. There are several ways of tackling this. The first of which may not work for all game types. You need to have a region on the map.. a circle, fairly small. When the player clicks or presses a button (whatever click or press you want to activate the 'pick up'), have an action that moves the region to the position of your unit. Then, when you issue the smart command, the location will be 'targeting unit (item) closest to the center of region' (you need to go through several menus to get it to look like that).

    This will make the unit 'look' around for the item closest to him in a specified radius and then pick it up.

    May I ask.. how did you disable right click movement? The only way I could figure out how to do that was by having the unit remain de-selected... which has its disadvantages.

    Posted in: Triggers
  • 0

    posted a message on Control/Camera Scheme

    I'm having a tough time finding a control/camera scheme that flows well. This is for a 3rd person, one unit map (same thing everyone is doing, it seems).

    Currently, I have WASD movement implemented, works fine. The camera is set to slowly rotate to behind the unit. This works well when you're in areas where you don't care much about control.

    It's where the mouse comes in that I have a problem.

    First of all, I need some way of attacking targets. Currently, I have the space bar order the unit to do a "smart command" around him. So if there's an item, he'll pick it up. If there's an enemy, he will attack it. Unfortunately, this just leaves me pressing space over and over. That kinda sucks.

    I'd like to just stay away from right click movement all together. It doesn't work well with the camera angle anyways. However, I need to be able to click things. Clicking units in game to interact with them or clicking inventory items.

    Rotating the camera VIA mouse only turned into a problem with multiplayer. The delay between pressing the left mouse button down and the camera actually moving made quick camera rotation adjustments a pain.

    So I guess what I'm asking is..

    How should Left Click be set up? Right click? When should the camera follow?

    It's not a question of how to do it, it's how it should be done. If I know what to do, I am confident I can do it. I just don't know what to do. Everything seems unnatural... but I suppose this is an RTS game and TPS movement shouldn't be flawless.

    Edit: Putting something together that's not bad. Feel free to let this post die.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Variable Scope?

    @s3rius: Go

    Right, so I would reference it by saying "PlayerHealth[TriggeringPlayer]". That makes sense.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Variable Scope?

    I understand the difference between global and private. These are different scopes for the variables designating how they can be accessed.

    My question is... how do you get a variable specific to a player? Do you have to set a ton of variables like "Player 1 Health", "Player 2 Health", etc.. or can you flag the variables as being client variables.. so each player gets a "copy" of the same variable?

    And likewise.. triggers. If a trigger is on, it is on for all players, correct?

    Posted in: Galaxy Scripting
  • 0

    posted a message on [Data] Tutorial: Boss bars.

    @Feithless: Go

    Why do you need a separate trigger to check for energy changes? Shouldn't the bar update by itself? I set up a health bar.. worked fine.

    Then I set up another bar with a different ID and told it to use the unit's energy.

    In game, I see two bars. HP and MP.. but the values are both HP. The bars are identical. When I get hurt, both bars update.

    I even tried setting MP to a variable that updated whenever the units energy changed, but it still just used the health.

    Edit: The reason I used "Triggering player +10" was to ensure no two bars had the same ID. If I had two players, Player 2's HP bar would be "2" and MP bar would be "12".

    Edit 2: Figured out setting the bar to the unit overrides everything else and forces it to use HP.

    Edit 3: Five drinks later, figured it out. I'm just an idiot. :)

    Posted in: Tutorials
  • 0

    posted a message on Camera - Disable Middle Mouse

    @ZeroAme: Go

    I got rid of all the zooms, strafes, and scrolls.

    Only one small problem left. Right now I have it set so that when the player clicks the middle mouse button, it disables camera input to prevent them from moving the camera around. However if they move the mouse really fast, they can move the camera slightly over and over, just before the trigger is able to disable input. This is a small problem, but it's the last one I have and I'd really like to make this somewhat air-tight.

    I don't see anything in that camera that would prevent this (thought setting strafe to 0 would fix it). Am I missing it?

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