• 0

    posted a message on Array with chance values then randomly pick one

    Hey,

    Couldn't find a good title for my problem so sorry for that.

    I have a problem where I have a 2D array of [2][5] each with a real value:

    array[1][1] = 25.00
    array[1][2] = 17.00
    array[1][3] = 31.00
    array[1][4] = 5.00
    array[1][5] = 15.00
    and the values of [2][..]
    all have diffrent values
    also all values can change at any given time

    now these values are just an example

    ok now i want to do a chance based thing on them, but I have no idea how to do that.
    for example all these values represent the chance of a unit spawning, and every second I want to spawn a unit. Now the total chance (if you add all values.) is 93%, but I want to spawn a unit everytime not only 93% of the time.

    So how would I summon a unit based on the chances in the array?

    I hope I made myself clear;)

    Thanks!

    Posted in: Triggers
  • 0

    posted a message on [Library] Talent System

    If I'm correct you can only have 4 columns per row and for the other 2 trees just input (when creating a button) that you want to create a button for tree 2 or 3.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on [Library] Talent System

    hmm about the multiple talent "trees" I have no idea might be possible.
    And about the variables if you have a set variable ..... at the top of the trigger the variable should be pointing to a parameter (9/10 times) and if you have a switch wich states
    if 1 update ability button
    if 2 update passive button

    then 1 needs to be ability
    and 2 needs to be passive
    (these can be find in preset tab)

    if 1 set variable 5* ....
    if 2 set variable 10* ...

    then 1 needs to be 5
    and 2 needs to be 10
    (these are also found in preset tab)

    If you think logical you can find em all out;)

    Gl

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on [Library] Talent System

    After you copy the triggers to your map for some reason some variables get removed in the triggers you just have to reset them, but most of the time is logical wich variable is supposed to be somewhere. And you can have up to 3 trees in a talent window.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on Quick question on behaviours

    I thought the value was around 65 diffrent behaviours per unit. Although you can stack them as much as you like.

    Posted in: Data
  • 0

    posted a message on Building can be walked through

    Hey,

    I created a building and I wanted it to be buildable on a ramp so I changed the footprint(as stated in a blizz post), but now units can just walk through my building:S So is there any way to fix that without changing back the footprint (or if the footprint thingy (so it can be build on ramps) can be achieved in another way)

    Thanks!

    Posted in: Data
  • 0

    posted a message on Warp in units.

    I will try the invisible super warp gate:P thanks!

    Posted in: Triggers
  • 0

    posted a message on Warp in units.

    Hey,

    I'm trying to warp in a units using triggers but I can't seem to figure out how it works. Probably really simple but I can't find out how. So anyone can help me out on this?

    Thanks!

    Posted in: Triggers
  • 0

    posted a message on how do i play a map with a friend without publishing it ???

    You can publish it Private then none can find the map and then you can easily test it with your friend

    Posted in: Miscellaneous Development
  • 0

    posted a message on Changing behaviour value using a behaviour

    Thanks got it working now;)

    Posted in: Data
  • 0

    posted a message on Changing behaviour value using a behaviour

    Hey,

    I'm trying to create a behaviour that changes a specific value of another behaviour.

    So I have behaviour A wich increases damage by 5 for example
    And with Behaviour B I would like to change the 5 to for example 7.

    Is this possible?

    Thanks!

    Posted in: Data
  • 0

    posted a message on Trigger spawns

    Use the action if then else then you can put a condition on the action part of the trigger. If you pres i when you open up the actions you should get the right one.

    Posted in: Triggers
  • 0

    posted a message on [Library] Talent System

    Nvm got it working

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on Race of a unit?

    Thanks it works now:P Already though I spelled Protoss wrong, but wasn't sure so thanks;)

    Posted in: Triggers
  • 0

    posted a message on Race of a unit?

    Hey,

    I couldn't find a function to check what race a unit is so I tried creating my own.

    I now have this:

    Get Unit Type Race
        Options: Function
        Return Type: Race
        Parameters
            Unit Type = No Game Link <Game Link - Unit>
        Grammar Text: Get Unit Type Race(Unit)
        Hint Text: (None)
        Custom Script Code
        Local Variables
            Race = Protos <Race>
        Actions
            General - Switch (Actions) depending on (Value of Units (String(Unit Type)) "Race" for player Any Player)
                Cases
                    General - If ("Protos")
                        Actions
                            Variable - Set Race = Protos
                    General - If ("Terran")
                        Actions
                            Variable - Set Race = Terran
                    General - If ("Zerg")
                        Actions
                            Variable - Set Race = Zerg
                Default
            General - Return Race
    

    And it always returns Protos.

    I probably screwed up the Catalog Field Value Get part, but I can't see where the error is. Can anyone help me?

    Thanks!

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