• 0

    posted a message on Simple Question: removing inactive players

    @Liquos: Go

    Try the following:

    Kill Unowned Units
        Events
            Game - Map initialization
        Local Variables
            AUnit = No Unit <Unit>
        Conditions
        Actions
            Unit Group - For each unit AUnit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Status of player (Owner of AUnit)) != Playing
                        Then
                            Unit - Kill AUnit
                        Else
    

    I've also attached a demo map:

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Resolved] Building Rally points

    Use:

    Unit - Order all units in (Last created units) to ( Move targeting (Rally point target point for point 1 with target 1 for <Insert Building Here>)) (Replace Existing Orders)
    

    Also, remember that you can issue an attack order instead of a move order to have them attack-move.

    I've attached a simple demo map.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Rural Zombie Onslaught 3D: Space Zombies!

    With the skill system of the game nearing completion, I thought I would release some details about how the skill system works. Every hero has a class. Each class has 4 skillsets containing 5 skills sorted by tier. There are currently 14 skillsets planned (and this is destined to go up). Also, there are a multitude of inherent general skills like shortcuts for commonly used types of items or issuing commands to civilians. Unfortunately, the command card is limited to 15 buttons and each character can only be assigned 31 abilities (and they can't be swapped out with triggers). As a result, an MMO-style command bar where skills can be assigned at will was required. After finagling around with the catalog and dummy skills (and a few thousand lines of script), I was able to come up with a system that does (mostly) what I want.

    Here is a preview listing of some select classes and their respective skillsets:

    Scientist - Chemist, Nano-Programmer, Robotics Engineer, Survivor

    Mercenary - Field Medic, Munitions Expert, Weapons Specialist, Survivor

    Civilian - MacGyverer, Merchant, Politician, Survivor

    And here are some screen-shots of a sample (test) skill tree and skill selector:

    Posted in: Project Workplace
  • 0

    posted a message on Setting Item Charges

    The item utility library should be able to help you out:

    BTW, item charges are of type fixed/real not int - just keep that in mind.

    Item Utility Library

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Library] Item Utility Library

    @A52BcE: Go

    Yeah, somehow I forgot to save the map after importing the working item library (it's more than just the i = i - 1) ... I've fixed it.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on Need help with regions

    @GregoryW: Go

    Unit - Order (Triggering unit) to ( Attack targeting (Center of region 002)) (Replace Existing Orders)

    Issue Order
        Unit: Triggering Unit
        Order: Order Targeting Point
            Ability Command:  Attack
            Target Point: Center Of Region
                Region: region 002
        Queue: Replace Existing Orders
    
    Posted in: Miscellaneous Development
  • 0

    posted a message on New Function / Return Value

    @ShaZe88: Go

    It looks like you are using the custom script checkbox on a function to define your custom script. This is currently (very) broken in the editor. As it is now, when you write a GUI function and click the custom script checkbox it simply inlines anything you write. This is far from a desired behavior. A workaround is to put your functions in their own custom script block then make a native GUI stub for your custom function. This is what I was trying to show above with the dog park map.

    Posted in: Galaxy Scripting
  • 0

    posted a message on New Function / Return Value

    Oh, I forgot to add that you can also put functions/actions into groups by right clicking on them and using the labels option. This makes them easier to find in when writing code with the GUI.

    Posted in: Galaxy Scripting
  • 0

    posted a message on New Function / Return Value

    If a function or action is written in custom script, GUI scripts will not be able to "see them" because they have no "grammar". One solution is to create a custom script function and then make a simple GUI stub function which just defines "grammar" for the custom script version. Another is to write a GUI function and write the function body in a custom script action. I have attached a simple map with how to do the GUI stub version.

    Note* The custom script checkbox seems to be borked at the moment - use a native stub instead (see map).

    Posted in: Galaxy Scripting
  • 0

    posted a message on [Library] Item Utility Library

    @A52BcE:

    Looks like a good start. Fixed in galaxy is the same as real in the GUI.  Also, certain types that exist in GUI do not exist at all in galaxy and are represented by integers (for handle types) and strings(for id types).  Also, I did not mean to go through and fully recreate each function in GUI, I meant copy and paste as custom blocks inside GUI functions (Although this is kind of bugged at the moment and you have to use a GUI - Custom Script Action instead of checking the custom script checkbox).  Well anyways, I'll try to finish converting the library so people can see how it works in both GUI and Galaxy.  Heck, I'm kind of bored, I think I'll make a demo map too.

    Oh, I forgot to add, for some reason item charges aren't based on whole numbers (integers) but fixed-point (real) numbers instead - this makes figuring out the code somewhat non-intuitive.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on [Library] Item Utility Library

    The lack of useful inventory functions in the Galaxy Editor is staggering. Here is a small library to help. It contains inventory queries, item charge manipulation, item stacking, and item use orders. Thanks to A52BcE's help, the library is now available in both galaxy (custom script) and GUI flavors so feel free to compare the two if learning custom script. Please post any bugs you find and addition requests.

    Notes on using the library
    - Don't use the charge functions on items which don't have charges (it won't work).
    - I recommend making a behavior called stackable and adding it to your stackable items' units for easier stacking identification. (The map has an example of this)
    - In order to use the orders you must have buttons assigned to the appropriate inventory ability. (This is also in the map).
    - Items with charges must have a max # of charges AND a charge cost AND an appropriate charge link.
    - Items are treated as units in game - this means you can use unit functions on them (If you didn't already know).
    - Item type refers to the catalog unit type of an item NOT the catalog item type - you can get this with script using UnitGetType on an item's unit.

    Helper Functions/Actions
    Units in group of type - Gets a unitgroup containing all the units in a unitgroup of the specified type.
    Order Set Target Item - Allows any order to additionally target an item.
    Item Type Charge Link - Tries to determine the charge link associated with an item type.

    Item Order Functions/Actions
    Order Use Item Instant - Same as Order Targeting Item (included for naming convention purposes).
    Order Use Item Targeting Point - Creates an order to use an item targeting a point.
    Order Use Item Targeting Relative Point - Creates an order to use an item on a relative point.
    Order Use Item Targeting Unit - Creates an order to use an item on a unit.

    Item Type Functions/Actions
    Item Type Max Charges - Gets the max number of charges an item type can have.

    Inventory Query Functions/Actions
    Inventory Count Items of Type - Counts the number of items of the specified type in a units inventory.
    Inventory Get Items of Type - Gets a unitgroup containing all items in an inventory of the specified type.
    Inventory Has Item of Type - Returns true if a unit has an item of specified type.
    Inventory Get Random Item of Type - Returns a single item of the specified type that a unit might be carrying.
    Inventory Total Charges Of Item Type - Returns the total charges of the specified item type in a units inventory.

    Item Charge Functions/Actions
    Item Set Charges Remaining - Sets the number of charges remaining on an item.
    Item Get Charges Used - Returns the number of charges used on an item.
    Item Get Charges Remaining - Returns the number of charges remaining on an item.
    Item Add Charges - Adds the specified number of charges to an item.
    Item Remove Charges - Removes the specified number of charges from an item and removes the item if it becomes <= 0.

    Inventory Management Functions/Actions
    Inventory Remove Item Charges Of Type - Removes the specified number of charges from the item charge total of the specified item type in a units inventory.
    Inventory Stack Items of Type - Stacks all items of the specified type in a players inventory.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on Rural Zombie Onslaught 3D: Space Zombies!

    Now that Starcraft 2 is out, it's time to make a map that is so awesome it's unstable.  To this end, I've decided to write the third chapter in the RZO series - Rural Zombie Onslaught 3D: Space Zombies!.  This one will focus on mimicking the feel of classic sci-fi movies with a minor focus on B-Rated horror movies.  As always, it will be team based and very hard.

    Map Name: Rural Zombie Onslaught 3D: Space Zombies!
    Map Size: 256 x 256
    Map Type: Team Survival

    Current Progress:
    [X] Planning (DONE!)
    [O] Terrain (95%)
    [O] Basic Triggering (Area Transitions, Environment, Etc.) (80%)
    [O] Spawn System (35%)
    [O] Custom GUI (90%)
    [X] Equipment System (100%)
    [X] Skill System (100%)
    [-] Vehicle System
    [O] Save/Load System (75%)
    [O] Items(10%)
    [O] Skill Trees &  Skills (40%)
    [O] Prologue (30%)
    [-] Act I
    [-] Act II
    [-] Act III
    [-] Act IV
    [-] Non-Story Missions
    [O] UI Enhancements (Loading Screen, Icons, etc.) (10%)
    [-] Custom Models
    [-] Balancing

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