• 0

    posted a message on Detach model from unit?

    Hi,

    I have a boss who has an ability that targets players. The ability has some "aiming" time, and then a projectile fires at the target point. I have created a visual target warning for the players using Attach Model to Unit (trigger action) as the boss starts his "aiming". After that aiming period is over, I would like to freeze the target model's position, so that it stops following the player's unit. How can I get this effect?

    Posted in: Triggers
  • 0

    posted a message on Boss Bar Cannot Draw Zero?

    So I've got a boss fight, added in a boss bar, and found out that although the numbers update properly when the boss's health reaches zero, the bar itself is not redrawn.

    Is this just a fundamental obstacle in the editor or is there a workaround? (Other than the janky fix of setting the value to 1 and then back to 0 when the boss dies)

    Posted in: Triggers
  • 0

    posted a message on Turning Trigger Off, Order of Action Execution Problems

    @Mille25: Go

    Thanks for the detailed and helpful response! I hate the data editor, but given how you described it that sounds like a very clean solution so I will go for it.

    Edit: Worked like a charm, one minor thing though. I started by making the buff length 0.05 and it actually was too short (infinite teleport loop), so I knocked it up to 0.1 and it works fine. I have noticed that the editor seems to have problems with really short time windows (specifically durations less than 0.1 seconds), i.e. cannot make unit face angle instantly, cannot wait for very small amounts of time, etc.

    -

    And MaskedImpostor, that doesn't circumvent the issue at hand here. That was my initial implementation :P

    Posted in: Triggers
  • 0

    posted a message on Operators?
    Quote from Mille25: Go
    1. PARAM(var) += 1;

    AHAH! This is the magic I have been looking for for so very long. (forum messed up my quote :( )

    And thanks ScorpSCII, I actually never knew that function existed! Haha...

    Posted in: Triggers
  • 0

    posted a message on Operators?

    I see that functions have an option to be made an operator, but I'm not really sure how to use this.

    Has anyone had any success making custom operators?

    If I wanted to create the classic unary increment operator, is this how I would go about it, or would that be something different? I'm getting very tired of doing Set Variable -> i = Arithmetic(i + 1) in GUI.

    Posted in: Triggers
  • 0

    posted a message on Turning Trigger Off, Order of Action Execution Problems

    The functionality I am trying to create is simple - a 2-way teleport pad. Enter region A and you are teleported to B. Once you leave region B and re-enter, you are teleported back to region A. And the cycle continues ad infinitum.

    My current approach uses 2 triggers, here is a rough outline:

    Trigger 1: Teleport (Initially ON)
    Events:
     - Unit enters A
     - Unit enters B
    Actions:
     - Turn Teleport OFF
     - Switch (triggering region)
         case A: Move triggering unit to B
         case B: Move triggering unit to A
    // ~~ Problems unless I place a Wait here ~~
     - Turn TeleportEnable ON
    
    Trigger 2: TeleportEnable (Initially OFF)
    Events:
     - Unit exits A
     - Unit exits B
    Actions:
     - Turn TeleportEnable OFF
     - Turn Teleport ON
    

    The issue is that even though I am turning TeleportEnable on after the move action (in theory), what's actually happening is that move action triggers the teleport enable. For example, lets say the unit enters A. That triggers Teleport and moves unit to B. Moving unit from A to B triggers TeleportEnable as the unit exits A. The unit enters B, triggering Teleport, and teleports back to A.

    However, IF I place a wait in the commented line, everything works "fine," for 1 player anyway, with nothing else going on. But I easily see this bugging out with 10 players all teleporting around at the same time, and possible other waits that I need for the actual gameplay. I suppose I could use a periodic trigger or a timer to create a makeshift "safe" wait, but I'm really wondering if there's a clean way to implement this system, and what my actual problem is.

    Posted in: Triggers
  • 0

    posted a message on Publishing Error

    @T0ssWarr1or: Go

    I have been getting this a lot as well randomly. It generally works if I wait a while and try later as the message suggests, however, it is very frustrating when I tell a friend I am going to logout quickly to publish and then they end up waiting for 20 minutes wondering where I am.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Can Only Create Even-Sized Cliffs?

    Simple question but haven't found a way around this yet... I want to make some raised cliffs of any integer valued width, mainly 4/5/6/7.

    Posted in: Terrain
  • 0

    posted a message on RejuvenateEnergySound

    @StealthToast: Go

    Ok thanks figured it out. The asset was the NexusWhat0 sound which is what I actually wanted to hear, was hearing something entirely different in the editor. Just doesn't make sense to me why the preview in the editor was not playing the right sound.

    If anyone could quickly explain to me what sound assets are that would be cool, didn't find anything useful googling it.

    Posted in: Data
  • 0

    posted a message on RejuvenateEnergySound

    I'm using the sound effect RejuvenateEnergySound in my map, when I previewed it in the editor it sounded cool, but in-game it sounds totally different - it's shorter and just lame. What's going on here? Same applies to the shield recharge sound.

    (Posted in audio forum a while back and have gotten 0 response)

    Posted in: Data
  • 0

    posted a message on Ability Triggers Sound to all Players - Purifier

    I hate the data editor so much but I know you could do this in triggers.

    Event: Ability is cast
    Condition: Triggering ability == Planet Cracker
    Action: For each player
                 Play sound X
                 Ping minimap at position of triggering unit
    

    Using the play sound action (rather than the play sound at point action) should ensure that all players will hear this ability. In addition, since you are not messing with the data editor, you won't end up making a bunch of other sounds global accidentally at the same time. If you do this, you probably should get rid of the sound actor in the data editor so it doesn't double-play.

    Posted in: Data
  • 0

    posted a message on Regions Stop Working After Merging Too Many Shapes?
    Quote from Mille25: Go

    Its not about the total number of regions, but the number of shapes defining a region.

    You say that as if I weren't clearly asking an entirely separate question; nonetheless, I will assume that you are saying I can have as many regions as I want in my map and nothing will break.

    Posted in: Triggers
  • 0

    posted a message on Create a Tower (Dota style)

    Nvm, looks like SoulTaker drew up a nice outline.

    Note: For trigger B, the proper event is "Unit - Any unit is attacked."

    I should also explain, a trigger is really a boolean function if you look at the script. It returns true if the conditions were true or it was told to ignore the conditions, otherwise it returns false. That being said, I still don't understand what he means by "If (Result of b trigger)."

    I think his outline is a nice starting point to get you thinking in the right direction, but definitely not a fully functioning solution at this point.

    Posted in: Triggers
  • 0

    posted a message on Saving Unit Inventory? (Bank)

    Quick rundown on steps to using a bank:

    At map initialization:

    Preload and sychronize bank <string literal> for player <integer literal>
    

    (Literal means non-variable, this is because this is happening statically. I would recommend creating a constant string variable called BANK_NAME for your bank name, you will need it later also... Constants do count as literal values since the compiler inserts the literal value whenever it encounters a constant. Apparently although the editor lets you use a constant value in this field, I tested it out and it does NOT work! Use only a literal value here! You can still use your constant BANK_NAME everywhere else.

    When you need to get a value from your bank:

    Open bank <string> for player X
    Set Bank[X] = (Last opened Bank)
    Set value = <Load action here>
    

    Use BANK_NAME for the string above if you created that constant. Bank[] should be an array of banks with size equal to number of players.

    When you need to save a bank:

    Set option Signature for bank <bank var> to Enable     // optional step for security
    Save bank <bank var>
    

    The editor gives you a "Bank is valid" function which checks for the signature, if you want to use the signature. Upon first loading the bank, you can check the validity and then clear the values if it is invalid.

    Of course, the signature is just an algorithm, so people have figured out how to crack it. It will give you a small level of security, but will not deter those who are determined. For guaranteed security, you will need to implement your own encryption and decryption algorithms (recommended only once you are sure people are actually playing your map regularly)

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