• 0

    posted a message on Hero Tutorial and ItemContainers.

    If you want certain items to go in to certain slots, Think of it as a table.

    For instance if you wanted 6 slots (3 columns x 2 rows) you would set them up accordingly

    index 1 row0 column 0 - Weapon Class

    index 2 row0 column 1 - Weapon Class

    index 3 row0 column 2 - Armor Class

    index 4 row1 column 0 - Armor Class

    index 5 row1 column 1 - Accessory Class

    index 6 row1 column 2 - Accessory Class

    so the top two left boxes will hold your weapons, the 3rd box on the top right would hold armor the 4th box on the bottom left would hold another armor, the two boxes on the bottom right would hold accessories.

    for the random spawning of heroes and assign them to players, ill upload a simple map in a sec.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Need big time help on a trigger.

    @zeldarules28: Go

    I already have a system like that working, only it's completely automated (you don't have to do the same steps over and over again). My problem is for reason when I have two items that are the same "ingredient" the store only takes the 1, and by passes everything else.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Can you check, and change an items class inside trigger editor?

    @redconfusion: Go

    how about checking for an item class?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Can you check, and change an items class inside trigger editor?

    I'm curious if you can check for an items class, and change it inside the trigger editor. If so, how do you do this?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Hero Tutorial and ItemContainers.

    Classes let you assign certain items to certain slots. For instance you might have two containers (one for equipping items, and one for storage)

    The container for equipping items will have the following:

    index 1 with the class "WeaponClass"

    index 2 with the class "Armor"

    index 3 with the class "Accessory"

    and so on, and so forth. Now depending on the class of the item, it will fill one of those slots. You're storage container will have no classes, therefore anything can be put there.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Need big time help on a trigger.

    So I'm working on a store, and I've got a lot of things working (buying items, buying requirements of items, etc) However there is one problem I've ran in to that I'm not sure how to solve. Currently I have items setup like the following:

    Basic Items - (these can be used as requirements to purchase "big items") Big Items - these are "composed" of basic items, and can be used as requirements to purchase "advanced items" Advanced items - use big items as a requirement for purchase.

    Now the problem is if I have two of the same items in a recipe, the store will only take one in to account, and skip over the 2nd duplicate item.

    (below is the "upgrade" trigger)

    What I want it to do, is take the duplicate item in to consideration, and also remove it from the inventory. I'm drawing a blank as to how I can do this, and could really appreciate any help. If you need a working example, I might be willing to provide that.

    Store:UpgradeItem
        Options: Action
        Return Type: (None)
        Parameters
            UpgradeID = 0 <Integer>
            CategoryID = 0 <Integer>
            SubCategoryID = 0 <Integer>
            ItemID = 0 <Integer>
            Hero = No Unit <Unit>
        Grammar Text: Store:UpgradeItem(UpgradeID, CategoryID, SubCategoryID, ItemID, Hero)
        Hint Text: (None)
        Custom Script Code
        Local Variables
            RequirementsMet = false <Boolean[3]>
            Unit = No Unit <Unit[3]>
            i = 0 <Integer>
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Store:All_Upgradable_Items[UpgradeID].has_components == true
                Then
                    General - For each integer i from 1 to 6 with increment 1, do (Actions)
                        Actions
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    Store:All_Upgradable_Items[UpgradeID].req1 > 0
                                Then
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Unit type of (Item carried by Hero in i)) == Store:All_Upgradable_Items[Store:All_Upgradable_Items[UpgradeID].req1].Upgrade_ItemUnit
                                        Then
                                            Variable - Set Unit[1] = (Item carried by Hero in i)
                                            Variable - Set RequirementsMet[1] = true
                                        Else
                                Else
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    Store:All_Upgradable_Items[UpgradeID].req2 > 0
                                Then
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Unit type of (Item carried by Hero in i)) == Store:All_Upgradable_Items[Store:All_Upgradable_Items[UpgradeID].req2].Upgrade_ItemUnit
                                        Then
                                            Variable - Set Unit[2] = (Item carried by Hero in i)
                                            Variable - Set RequirementsMet[2] = true
                                        Else
                                Else
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            And
                                                Conditions
                                                    Store:All_Upgradable_Items[UpgradeID].has_components == true
                                                    Store:All_Upgradable_Items[UpgradeID].req2 == 0
                                        Then
                                            Variable - Set RequirementsMet[2] = true
                                        Else
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    Store:All_Upgradable_Items[UpgradeID].req3 > 0
                                Then
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Unit type of (Item carried by Hero in i)) == Store:All_Upgradable_Items[Store:All_Upgradable_Items[UpgradeID].req3].Upgrade_ItemUnit
                                        Then
                                            Variable - Set Unit[3] = (Item carried by Hero in i)
                                            Variable - Set RequirementsMet[3] = true
                                        Else
                                Else
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            And
                                                Conditions
                                                    Store:All_Upgradable_Items[UpgradeID].has_components == true
                                                    Store:All_Upgradable_Items[UpgradeID].req3 == 0
                                        Then
                                            Variable - Set RequirementsMet[3] = true
                                        Else
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            And
                                Conditions
                                    RequirementsMet[1] == true
                                    RequirementsMet[2] == true
                                    RequirementsMet[3] == true
                        Then
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    (Player (Triggering player) Minerals) >= Store:All_Upgradable_Items[UpgradeID].ItemCost
                                Then
                                    Player - Modify player (Triggering player) Minerals: Subtract Store:All_Upgradable_Items[UpgradeID].ItemCost
                                    General - Pick each integer from 1 to 3, and do (Actions)
                                        Actions
                                            General - If (Conditions) then do (Actions) else do (Actions)
                                                If
                                                    Unit[(Picked integer)] != No Unit
                                                Then
                                                    Unit - Remove Unit[(Picked integer)] from the game
                                                Else
                                    General - Wait 0.25 Game Time seconds
                                    Unit - Create one Store:All_Upgradable_Items[UpgradeID].Upgrade_ItemUnit item in the inventory of Hero
                                Else
                                    UI - Display "Insufficient Minerals to purcahse I..." for (Player group((Triggering player))) to Subtitle area
                        Else
                            UI - Display "You do not have the required Items." for (Player group((Triggering player))) to Subtitle area
                Else
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Store:All_Items[UpgradeID][SubCategoryID][ItemID].Upgradable == true
                        Then
                            General - For each integer i from 1 to 6 with increment 1, do (Actions)
                                Actions
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            Store:All_Items[CategoryID][SubCategoryID][ItemID].Componet1 > 0
                                        Then
                                            General - If (Conditions) then do (Actions) else do (Actions)
                                                If
                                                    (Unit type of (Item carried by Hero in i)) == Store:All_Upgradable_Items[Store:All_Items[CategoryID][SubCategoryID][ItemID].Componet1].Upgrade_ItemUnit
                                                Then
                                                    Variable - Set Unit[1] = (Item carried by Hero in i)
                                                    Variable - Set RequirementsMet[1] = true
                                                Else
                                        Else
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            Store:All_Items[CategoryID][SubCategoryID][ItemID].Componet2 > 0
                                        Then
                                            General - If (Conditions) then do (Actions) else do (Actions)
                                                If
                                                    (Unit type of (Item carried by Hero in i)) == Store:All_Upgradable_Items[Store:All_Items[CategoryID][SubCategoryID][ItemID].Componet2].Upgrade_ItemUnit
                                                Then
                                                    Variable - Set Unit[2] = (Item carried by Hero in i)
                                                    Variable - Set RequirementsMet[2] = true
                                                Else
                                        Else
                                            General - If (Conditions) then do (Actions) else do (Actions)
                                                If
                                                    And
                                                        Conditions
                                                            Store:All_Items[CategoryID][SubCategoryID][ItemID].Componet2 == 0
                                                Then
                                                    Variable - Set RequirementsMet[2] = true
                                                Else
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            Store:All_Items[CategoryID][SubCategoryID][ItemID].Componet3 > 0
                                        Then
                                            General - If (Conditions) then do (Actions) else do (Actions)
                                                If
                                                    (Unit type of (Item carried by Hero in i)) == Store:All_Upgradable_Items[Store:All_Items[CategoryID][SubCategoryID][ItemID].Componet3].Upgrade_ItemUnit
                                                Then
                                                    Variable - Set Unit[3] = (Item carried by Hero in i)
                                                    Variable - Set RequirementsMet[3] = true
                                                Else
                                        Else
                                            General - If (Conditions) then do (Actions) else do (Actions)
                                                If
                                                    And
                                                        Conditions
                                                            Store:All_Items[CategoryID][SubCategoryID][ItemID].Componet3 == 0
                                                Then
                                                    Variable - Set RequirementsMet[3] = true
                                                Else
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    And
                                        Conditions
                                            RequirementsMet[1] == true
                                            RequirementsMet[2] == true
                                            RequirementsMet[3] == true
                                Then
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Player (Triggering player) Minerals) >= Store:All_Items[CategoryID][SubCategoryID][ItemID].ItemCost
                                        Then
                                            Player - Modify player (Triggering player) Minerals: Subtract Store:All_Items[CategoryID][SubCategoryID][ItemID].ItemCost
                                            General - Pick each integer from 1 to 3, and do (Actions)
                                                Actions
                                                    General - If (Conditions) then do (Actions) else do (Actions)
                                                        If
                                                            Unit[(Picked integer)] != No Unit
                                                        Then
                                                            Unit - Remove Unit[(Picked integer)] from the game
                                                        Else
                                            General - Wait 0.25 Game Time seconds
                                            Unit - Create one Store:All_Items[CategoryID][SubCategoryID][ItemID].ItemUnit item in the inventory of Hero
                                        Else
                                            UI - Display "Insufficient Minerals to purcahse I..." for (Player group((Triggering player))) to Subtitle area
                                Else
                                    UI - Display "You do not have the required Items." for (Player group((Triggering player))) to Subtitle area
                        Else
    
    Posted in: Miscellaneous Development
  • 0

    posted a message on Custom Inventory Help

    currently in the process of developing a custom inventory using dialogs and such, however I could use a few pointers

    1. Is possible to use the default inventory system, and HIDE it. Then simply use the dialog to display the items inside the inventory?
    2. Should I use unit groups? For instance could I have a unit group, with an array of [3][6] (the first index is the player id, where the 2nd is the ID of a Item Unit, the simply use a loop to display the dialog?
    Posted in: Miscellaneous Development
  • 0

    posted a message on Request: Zone Control Tutorial

    What if I do the following:

    • create a a boolean variable with an array index of 2 (index 1 for team 1, index 2 for team 2)
    • add players unit to a unit group upon entering a region
    • get the number of units in that unit group that are tied to that region
    • if the number of units in group 1 > group 2 - decrease the amount of time for group 1, and increase the amount of time for group 2 (after I check the boolean)
    • if group 1's timer elapsed (they completed capping the point) set a boolean to true, and apply some kind of behavior to the capping team.
    • if the number of units in group 2 = group 2, - pause
    • if the number of units in group 1 =< group 2, check and see if the boolean for group 1 is set to true (in which case group 1 has already capped the * * point, and it needs to be uncapped.

    Edit: I would also have to create a function which can get the TeamID and PlayerID of each player that enters the region, and assign it to a unit variable.

    Posted in: Tutorials
  • 0

    posted a message on Request: Zone Control Tutorial

    Hi there. I'm currently trying to figure out how to create a "zone control" map. For instance:

    • There will be 4 control points.
    • When a player gets in to a certain distance of a control point a "progress bar" appears with this teams "color" (lets say red for team 1, and blue for team 2). It takes 5 full seconds to capture a control point. Each player in the area speeds or slows the progress bar by .5 seconds (so two players the progress bar would move by 1).
    • if there is an equal amount of players in area on the opposition I want to "pause" the progress bar.
    • if team 1 has 2 players in the area, and team 1 has 1 player in the area, team 1 should slow the progress of the bar by .5
    • If a control point is already capped by a team, I want to uncap and then recap the control point.

    Any help would be very much appreciated.

    Posted in: Tutorials
  • 0

    posted a message on Exporting Wow Models and Importing them in to SC2?

    @tigerija: Go

    Whats with the irrational reaction? It's perfectly legal (long as you don't pass them off as your own).

    Posted in: Artist Tavern
  • 0

    posted a message on Exporting Wow Models and Importing them in to SC2?

    @AegisRunestone: Go

    This makes absolutely no sense, you're exporting content from one blizzard game, to Import in to another.

    <<quote>>First of all, its not illegal. As long as your not redistributing the models as forgery (claiming them as your own work), and your not using them for commercial use, it is perfectly legitimate to import wow models/icons into your WC3 map.

    I had a discussion about this just a couple of days ago with a Blizz employee over on the battle.net forums.<</quote>>

    a quote from another forum, which DOES make sense. long as you give credit where credit is due, you're golden.

    Posted in: Artist Tavern
  • 0

    posted a message on Exporting Wow Models and Importing them in to SC2?

    I'm curious as to how hard of a process this is? I know this was doable in war3. Does the M3 plugin support this?

    update: Check out [Galaxy Noobs] wow to sc2 in 30 seconds no 3dmax

    Posted in: Artist Tavern
  • 0

    posted a message on Dialog and loops (need help!)
    Quote from s3rius: Go

    Well, You're not increasing tmpInt

    I assumed by having the tmpInt variable in the for loop condition it would automatically increase, is this not the case?

    Quote:

    The Break statement will cancel the loop after the first iteration. Why did you even put it there?

    I actually removed that.

    Quote:

    What's with that (tmpInt + 1) in the Move-action? At that point (tmpInt + 1) doesn't exist yet.

    Removed.

    Instead I changed the loop entirely

    General - Pick each integer from 1 to 6, and do (Actions)
            Actions
            Dialog - Create a Modal dialog of size (winWidth, winHeight) at (OffsetX, OffsetY) relative to Top Left of screen
            Variable - Set CharSel:PlayerWindow[(Picked integer)] = (Last created dialog)
            Variable - Modify tmpOffsetY: + (winHeight + set_tmpOffSetY)
            Dialog - Show CharSel:PlayerWindow[(Picked integer)] for (All players)
    

    Still no success, I'm obviously missing something.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Dialog and loops (need help!)

    bump

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