• 0

    posted a message on Function settings

    @abvdzh: Go Okay, here is what I found out about some of them:

    • Hidden: This just hides the action in the list of actions/functions. You can create function "Test" and set it as hidden, and when you want to use it in a trigger, you won't find it in the action list, even if you search for "Test". You can still access it via custom script though.
    • Operator and Custom Script: Haven't done much with those myself, but it looks like they are pretty much the same, except Custom script messes up the GUI completely...

      Here's an image where the three functions OperatorWait, ScriptWait and UsualWait are used, which I put the exact same custom script into: "Wait(lp_time, c_timeGame);" (they have time as parameter).


    The Operator function (as opposed to the UsualWait function which is called inside the trigger and will execute it's script in it's own function call) just pastes its content script into the trigger. This causes a syntax error, because the trigger does not have the parameter "time" (you could bypass this by using preprocessor-code "#PARAM(time)" instead of "lp_time"). The custom script function seems to do exactly the same, with the exception that you have an extra field in the GUI which doesn't seem to do anything...

    • Subfunctions: Also pastes custom script code directly into the trigger, with the addition that you can define function sets which you can execute. The best example here is probably the "If-then-else" Action. It has the subfunctions "If", "Then", and "Else". How they are used can be seen in the custom script section of the action. In the "ifthenelse" case, it checks the result of the "If" subfunctions and then runs either the "Then" or the "Else" subfunctions.
    • Restricted: As the tooltip says this probably just marks functions like the "Award Achievement" one, so non-blizzard mapmakers are unable to use them. You probably don't want to flag this one.

      But like SoulTaker already said, you probably won't really need any of those except Create Thread. "Native" has to do something with custom libraries I believe, but I have no idea what it does. "Hidden" might be useful for libraries aswell, since you can hide the function to people who use the library. I found Subfunction stuff to be really useful for in-trigger stuff organization and you can do stuff like giving the function multiple actions as "parameter".
    Posted in: Triggers
  • 0

    posted a message on Respawn Multiple Fires.

    Most of your actions reference "number of players in (playergroup(triggering player))" as an array index. Since the playergroup(triggering player) always only contains one player, this function will always return 1. This also means that The timer that is started and waited for is always Hero Revival[1], which may cause some problems. Using "Triggering Player" as array index should be fine.

    Posted in: Triggers
  • 0

    posted a message on lllllllllll

    Okay that sounds a bit different.Do you have triggers anywhere that punish players if they didnt build the stuff at all? (Since the construction thing will not run if nothing is constructed)

    How are the win and loss stuff used? Do you want to give more points the earlier some goal was achieved or any other sort of progress for each goal? Or do you just want to give points depending on goal is achieved or not?
    In the second case you could switch your system to some time based one (Like trigger for first factory:
    Event - Time elapsed is 270 Actions - Win if there are any factories built
    and for second one two triggers, one which saves how many factories you have at 540 and one that checks at 565 if there are more factories than before).

    Posted in: Triggers
  • 0

    posted a message on lllllllllll

    I guess it depends on how you want to do it. What do you want to happen if the player for example builds two factories at Mission time 200? Do you want both to count towards the 270 win definition or only the first one and the second one goes to the loss @ 540 definiton? In the first case you could connect both conditions with or:

    If
         Or
            Mission Time <= 270
            And
               Mission Time <= 565
               Mission Time > 540 
    Then 
         win 
    Else 
         loss...
    


    In the second case you could check how many have already been built (by either a variable counting up whenever it is built, or by checking how many there are on the map in case it's guaranteed they dont get destroyed). You could then check like

    If
         Or
            And
               Mission Time <= 270
               FactoriesBuilt == 0
            And
               Mission Time <= 565
               Mission Time > 540 
               FactoriesBuilt == 1
    Then 
         win 
         FactoriesBuilt + 1
    Else 
         loss...
         (FactoriesBuilt +1?)
    
    Posted in: Triggers
  • 0

    posted a message on Items despawn from hero inventory when despawning

    You may want to wait 30 seconds from the time on when the item is dropped, not when it is created. Use the Event "Unit manipulates Inventory" for this and refer to the item with "Triggering inventory item". Also you need to check wether the item is picked up in the meantime (like, item picked up after 10 seconds and then dropped again after 10 seconds, then the item has to wait 30 seconds again before disappearing). So when an item is dropped, you have to check repeatedly whether the item is still on the ground.

    Trigger could look like this:

        Events
            Unit - Hero Drops Any Item
        Local Variables
        Conditions
        Actions
            General - Repeat (Actions) 30 times
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Unit carrying (Triggering inventory item)) != No Unit
                        Then
                            General - Skip remaining actions
                    General - Wait 1.0 Game Time seconds
            Unit - Remove (Triggering inventory item) from the game
    



    There's probably a data solution aswell where the item gets a behavior lasting 30 seconds when dropped with maybe a validator to remove that behavior when picked up, but not sure if something like this exists.

    Posted in: Triggers
  • 0

    posted a message on Map mods explained?
    Quote from Ahli634: Go

    - Scenario 1: you can edit and update the mod and your 10 maps are all updated along with it. You won't have to updatie all of your 10 maps manually.

    Are you talking about online updating or just offline for your local files? When I tested some stuff with mods some time ago I had the issue that when I had a map uploaded that used an uploaded mod, I could upload a new version of the mod, but the map still referred to the old version of the mod (AKA I couldn't tell the map to use the latest bnet version of the mod just like it does for the blizzard mods). Has that been fixed by now / is there a way to do this?

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Solved] Units cost less than they are supposed to

    Wow. Would never had thought of point 3! That might actually be an issue. Thanks, I will take a look into that!

    Edit: Yup, the shared resources were the problem. Thanks a lot!

    Posted in: Data
  • 0

    posted a message on [Solved] Units cost less than they are supposed to

    Hey guys I have one quite strange issue with unit costs.
    Let's say I have one unit that costs 200 minerals. Most of the time, that also is the case and it actually costs 200 minerals, but sometimes (usually later into the game and mostly on bnet, wasn't able to reproduce this offline), I can buy that unit for less. It might then be that it only requires 150 minerals or sometimes even no minerals at all! However, it can be that I can build them for less minerals (lets say 100), and if I wait until I got some more minerals, it will still take away all my minerals when I build the unit, up to the actual 200 mineral cost.
    The same issue seems to occur with upgrades and abilities aswell! I have some abilities that cost 1 gas or research that costs 50 minerals and 3 gas and it happens that I can buy/cast them for free when I am at 0 gas!? and sometimes if I got let's say 10 minerals and 0 gas my 50/3 upgrade says I have enough gas but not enough minerals!?
    What the hell is going on here? Anyone has an idea?

    Posted in: Data
  • 0

    posted a message on Word of String Saving

    Just put the string together from substrings. Since you always store <value><space><value>... each mission uses two "letters" of the string. so if you want to update status of mission "x", set savestring = substring(oldSavestring, 0, x-1) +"<value x> "+substring(oldSavestring, x+2, length(oldSavestring)).

    Posted in: Triggers
  • 0

    posted a message on i need A little help About "Bank"

    Your "BankPreload" must not contain a variable. You have to put an actual number into the field (this means, if you got 12 players you need the same action 12 times, always putting an different number inside).

    Posted in: Triggers
  • 0

    posted a message on How do I respawn Mobs at their Original Positions

    @Mugen245: Go

    You have multiple custom values, you could store "X of point" in custom value 1 and "Y of point" in custom value 2 on creation and on death respawn it at (custom value 1, custom value 2).

    Posted in: Triggers
  • 0

    posted a message on Dialog Box Issues

    You create a Dialog and then show "last created dialog item". Dialog != item, so your dialog is never shown...

    Posted in: Triggers
  • 0

    posted a message on [solved] Setting a unit exp value on creation.

    Add a debug message after "set unit property" and print the content of "EXP[triggering player]". If that shows a value != 0 I have no idea...

    Posted in: Triggers
  • 0

    posted a message on [solved] Setting a unit exp value on creation.

    I never had problems setting a unit's exp by variables. Could you show some of your code?
    (This one works perfect for me, so I don't see why passing a variable shouldn't work:

    Unit - Set unit Experience to ((unit Experience (Current)) + part)
    

    )

    Posted in: Triggers
  • 0

    posted a message on Calculating pathing distance

    There is a function "pathing cost between points". Did not work with that so much but I guess that one could help you.

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