Results 1 to 4 of 4

Thread: [tutorial] Make an Assault game type [script public release]

  1. #1
    Neanderthal Dwood's Avatar
    Join Date
    Sep 2008
    Location
    Wouldn't u like to know?
    Posts
    4,189

    [tutorial] Make an Assault game type [script public release]

    There are two ways to do this, One has to be with weapons, and therefore only works on CTF gametypes. 2nd, is with attaching vehicles to players.

    Why? because it requires that you be able to track what team an individual player is on.

    Okay, so let's begin with the outline of the idea. So you're an enterprising mapper and want to replicate tf2 with your own little twists.

    Let's focus on Blue team.

    We're going to want 1 boolean for each member of the blue team.

    Code:
    (global boolean reddoor1 false)
    Repeat that code until you have 8 booleans, using the same scheme. This is going to tell us if the door is open or not. Now, you could go the extra step and kill a biped instead of using a boolean to tell everyone the certain door is open, but that's not for right now.

    Beware, Halo Script is Case-sensitive.


    Next up: ;; Volume test <REDDOOR#> for an object, <BLUE#>

    REDDOOR# is a volume trigger, and BLUE# can be almost anything that syncs. BLUE# will be an object that we attach to the players in order to track them and be sure that RED team cannot activate blue's triggers.

    In this case, Blue will be the attackers and red will be the defenders.

    Start out the code as follows:
    Code:
    (script continuous doorcheckrate
    (if (or
    (volume_test_object REDDOOR1 BLUE1)
    (volume_test_object REDDOOR1 BLUE2)
    )
    Repeat the Volume test object, changing BLUE1, BLUE2, BLUE3, on up to 18, just to be safe. (Two extra vehicles)

    Code:
    (set reddoor1 1))
    If a member of blue team enters the volumes, then set the boolean for that specific door to 1. Which, as you will see later, will set the crusher vehicle to destroy the door. (would work to set a kill biped script but that's a lot of hassle considering how long the script will be)

    In essence, you would wind up with the following script for door checkrate.
    Code:
    (script continuous doorcheckerate ;; Volume test <REDDOOR#> for an object, <BLUE#>
    
    (if (or
        (volume_test_object REDDOOR1 BLUE1)
        (volume_test_object REDDOOR1 BLUE2)
        (volume_test_object REDDOOR1 BLUE3)
        (volume_test_object REDDOOR1 BLUE4)
        (volume_test_object REDDOOR1 BLUE5)
        (volume_test_object REDDOOR1 BLUE6)
        (volume_test_object REDDOOR1 BLUE7)
        (volume_test_object REDDOOR1 BLUE8)
        (volume_test_object REDDOOR1 BLUE9)
        (volume_test_object REDDOOR1 BLUE10)
        (volume_test_object REDDOOR1 BLUE11)
        (volume_test_object REDDOOR1 BLUE12)
        (volume_test_object REDDOOR1 BLUE13)
        (volume_test_object REDDOOR1 BLUE14)
        (volume_test_object REDDOOR1 BLUE15)
        (volume_test_object REDDOOR1 BLUE16)
        (volume_test_object REDDOOR1 BLUE17)
        (volume_test_object REDDOOR1 BLUE18)
    )
    (set reddoor1 1))
    Keep doing that until you get all of the doors you want for red.

    If you haven't noticed, this script is such that as Blue gets farther and farther vs Red, then Red gets better weapons.

    Code:
    (if (and (unit_get_health reddoor1biped) (= reddoor1 1)) (object_teleport crushervehiclereddoor1 <cutscene_flag>))
    If reddoor1 (our boolean) = true, spawn crusher vehicle at the cutscene flag, killing our door.

    To Be continued.

    Multi teleporters and other things to be discussed in the next update.
    Reply With Quote

  2. #2
    Free Kantanomo English Mobster's Avatar
    Join Date
    Nov 2008
    Location
    Southern California
    Posts
    1,932

    Re: [tutorial] Make an Assault game type [script public release]

    Didn't Inferno make something like this a while back?
    Reply With Quote

  3. #3
    HA10 Limited's Avatar
    Join Date
    Sep 2006
    Location
    England
    Posts
    7,800

    Re: [tutorial] Make an Assault game type [script public release]

    You realise, you are assuming the teams arent stacked?
    Reply With Quote

  4. #4
    Neanderthal Dwood's Avatar
    Join Date
    Sep 2008
    Location
    Wouldn't u like to know?
    Posts
    4,189

    Re: [tutorial] Make an Assault game type [script public release]

    Quote Originally Posted by Limited View Post
    You realise, you are assuming the teams arent stacked?
    That is understood, but stacked teams happen all the time. It is up to the mapmaker to provide balance to the map.

    The script can also be adjusted so that it can work for CTF gametypes.
    Reply With Quote

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •