SC2Mapster Forums

Resources > Trigger Libraries & Scripts

Xeno Crisis Combat System

  • 6 posts
    #1 Jan 29, 2013 at 21:02 UTC - 0 likes

    This is a work in progress...

    XC Combat System

    By BasharTeg
    Version 0.1

    INFORMATION

    This library is intended to create a custom weapon and projectile system similar to the one seen in the map Xeno Crisis.

    It is intended to work with a single unit for each player, though you may be able to change this with some clever modifications.

    This is most suitable for moderate to advanced game designers.

    DEMONSTRATION

    Skip to 4:10 -

    COMPONENTS

    This library requires several data components working in tandem.
    First, you will need a unit who will fire a weapon.
    Second, you will need weapons.
    Third, you will need projectiles.
    Fourth, you will need a Reload buff.
    Fifth, you will need a Hidden Target unit.

    SETUP

    This will help you set up the library for use with a simple semi-auto pistol weapon.

    Use the Setup trigger in the example map for reference.

    1. Copy the following Data objects from the example map:

    NOTE: You can now load these into your map by adding the XC Combat System dependency.

    - Units: HiddenTarget, SmallBullet
    - Actors: HiddenTarget, SmallBullet
    - Effects: ApplySBSpawn, DestroyBullet, Dummy, SBWeaponFX, SmallBulletDamage, SmallBulletImpact, SmallBulletSearch
    - Behaviors: Spawn Small Bullet, SmallBulletSearcher, Reloading, BulletTimedLife
    - Weapons: Standard Pistol (Missile)

    NOTE: If the data objects do not link properly, refer to the example map to see how everything should fit together.

    2. In the Data editor, find the unit you wish to use as the main shooter for the player. In the example map, I chose the Ghost.
    Remove all weapons from the unit and add Standard Pistol (Missile). Also change Behavior: Response to "No Response" and Combat: Default Acquire Level to "Passive."

    3. Import the library into your map. If you do this before adding the data objects, some things may not link up properly, which may cause errors.

    4. Place the shooter unit on the map for the player. Also place 1 HiddenTarget unit for the player somewhere on the map. This unit is invisible, so don't be alarmed when nothing appears after you place the unit.

    5. Create a Setup trigger as in the example map, changing the parameters as necessary:

    -------    Setup
    -------     Events
    -------         Game - Map initialization
    -------     Local Variables
    -------     Conditions
    -------     Actions
    -------         XCCS Assign Reload Buff(Reloading)
    -------         XCCS Assign Reload Sound(1, 250mmStrikeCannonsUnMorph)
    -------         XCCS Assign Shooter(Ghost [19.45, 27.34])
    -------         XCCS Assign Weapon Type(0, Standard Pistol (Missile))
    -------         XCCS Assign Projectile Type(0, SmallBullet)
    -------         XCCS Assign Initial Clip Ammo(21, 10.0)
    -------         Trigger - Run BulletProjectileSet  (Check Conditions, Don't Wait until it finishes)
    

    6. Test the map. If set up properly, attacking anywhere on the ground should cause your shooter unit to fire projectiles in that direction.

    Adding additional weapons and weapon types is a bit more difficult and is beyond the scope of this guide. Keep an eye on this thread for additional information.

    Last edited Feb 01, 2013 by BasharTeg
    Name Description Size MD5
    XC_Combat_System.SC2Map Example Map for XCCS 134.3 KiB eff896c161de...

    My Projects:
    Malum Ruina: SC2Mapster
    Eternal Exile: SC2Mapster
    Spine Crawler Madness: SC2Mapster
    Xeno Crisis: SC2Mapster

    #2 Jan 29, 2013 at 21:04 UTC - 0 likes

    Reserved for advanced tutorials

    #3 Jan 31, 2013 at 22:18 UTC - 0 likes

    Very nice! I hope that Blizzard will improve the item system, so almost no triggers will be needed for make this weapons works.

    Also with ZypheRZO library's, you can add or substract charge directly on the item in the inventory. It is very useful when you have many units with reloading weapon (Else there could be too many floating numbers).

    One question, Why are you using tech tree at the place of simple requirements? For example, if you have 2 ghosts with the same weapon, the tech tree will work for all the ghosts, but with simple requirements you can easily activate or deactivate a weapon. I mean by requirement a behavior that add a weapon to the unit and that behavior is verified with a requirement (Blizzard haven't add a requirement slot for weapons...).

    #4 Feb 01, 2013 at 01:02 UTC - 0 likes
    Quote from tatatatate: Go

    One question, Why are you using tech tree at the place of simple requirements? For example, if you have 2 ghosts with the same weapon, the tech tree will work for all the ghosts, but with simple requirements you can easily activate or deactivate a weapon. I mean by requirement a behavior that add a weapon to the unit and that behavior is verified with a requirement (Blizzard haven't add a requirement slot for weapons...).

    I'm not sure what you mean by using the tech tree. It doesn't really matter, as far as the library is concerned, how the shooter gets the weapon, only that the shooter has the weapon. Changing weapons using requirements is certainly a valid option, as is modifying weapons using triggers. I changed the weapon via the data editor because it seemed the simplest way of explaining that step, but any other way would work just as well! :)

    #5 Feb 01, 2013 at 12:54 UTC - 0 likes

    Quick update. I've published a mod entitled XC Combat System which can be loaded into your map via dependencies. This will automatically load the data elements mentioned in the SETUP section.

    #6 Feb 02, 2013 at 03:09 UTC - 0 likes

    It's just that I was asking myself about tech tree :)

  • 6 posts

You must login to post a comment. Don't have an account? Register to get one!