Scripting Feedback

Discussion in 'Halo and Forge Discussion' started by MAYONADEx, Sep 27, 2016.

  1. MAYONADEx

    MAYONADEx Forerunner

    Messages:
    2
    Likes Received:
    1
    Im forging a FFA tourney map inspired from the H3 mini game and I'm trying to have a wall despawn that's located between the players before they go at it. I'm basically done just need to do this part. I looked at the mongoose sumo map for reference but I'm still confused and can't seem to get things to work. Could anyone give me the correct way to script 3 stages of walls that despawn for a round based game type? MAYONADEx is the gt if you'd like to see what I have going.
     
  2. Yumudas Beegbut

    Yumudas Beegbut Legendary
    Wiki Contributor Senior Member

    Messages:
    393
    Likes Received:
    352
    Didn't see this post until now. I'm not familiar with the FFA Tourney mini game, but I could tell you how to do something like the disappearing floors from Mongoose Sumo. Is that what you need? Scripts that activate at fixed times after the start of each round? Is the timing based on the start of the round or when players spawn each round?
     
  3. Sn1p3r C

    Sn1p3r C Halo 3 Era
    Creative Force

    Messages:
    379
    Likes Received:
    578
    I'm approaching this by having 4 stages in my mind.

    The basic premise - we're going to want to reset the map to the first stage at the beginning of every round, and use timers that will move your map through the 3 stages of walls. (there are other ways to do this, but if you just need simple timers, it should work fine)

    First, we'll have the default state - all walls in place, the way each round is supposed to start. Since this will happen on the Round, we will use a message on channel ROMEO to create this state.

    Next, we'll have the state where one wall disappears. We will use a message on channel ALPHA to interact with this state. We'll use messages on BRAVO for the second wall a a CHARLIE for the third wall.

    Our goal here is to create a pair of Round Manager objects that will send a message on each of those channels at the appropriate time, which will make it easy to script in the games - just have your conditions be On Message(CHANNEL) and then set your action accordingly.

    The first Round Manager object is in charge of sending messages when the round starts. It needs to exist at all times, which is why it is seperate from the second round manager object.

    Spawn in your first object, say a whale.


    Round Manager 1 (Whale)
    Script 1:
    Condition: On Match Start
    Action: Send Message (Romeo)

    Script 2:
    Condition: On Round Start
    Action: Send Message (Romeo)

    Now spawn in another object, say a pig. (The first one can be a script brain, but we need a physical object here!)

    This is your other half of the pair, and will be handling the Alpha, Bravo, Charlie, etc messages. We're going to despawn it at the start of a round. Then, when it respawns, it'll send its first message. From there, we can just use timer scripts.

    For the sake of this example, let's say you want the first wall to despawn after 40 seconds, the second wall to despawn after 30 seconds, and the third wall to despawn after 20 seconds. Here's how our object looks:

    Round Manager 2 (Pig)
    Script 1
    Condition: On Message Received(Romeo)
    Action: Despawn
    //Resets this object at the start of each round


    Respawn settings:
    Respawn: Yes
    On/Destroyed - 40 seconds (your first wall timer)

    Script 2:
    Condition: Spawn
    Action: Send Message(Alpha)

    Script 3:
    Condition: On Timer
    Initial Delay: 30 seconds (Your second wall timer)
    Repeat: 0.00 (no need to repeat message)
    Action: Send Message(Bravo)

    Script 4:
    Condition: On Timer
    Initial Delay: 50 second (second wall timer + third wall timer - 30 + 20)
    Action: Send Message(Charlie)

    //note, you could simplify this timer script to have just the duration you intend by splitting out each message to a different pig object. Since you are only doing 3 walls though, adding the duration is not a big deal)

    So, now we've got messages going out when the round starts, and on your three durations for Alpha, Bravo, and Charlie respectively. It's trivial now to script your objects... Each one needs just 2 scripts. The first to reset the object when the round starts. The second to make the object do something when it's supposed to. This example uses spawning/despawning, like for your walls, but you could use movement, color changes, rotation - whatever works. Just remember to reset any actions on the Romeo message and take any actions on the Alpha/Bravo/Charlie message.

    Reset script:
    Condition: On Message(Romeo)
    Action: Spawn

    Action script
    Condition: On Message(Bravo)
    Action: Despawn

    //This would be your second wall. Your first wall would despawn on Alpha, and your third wall will despawn on Charlie.

    Hope that was helpful! Let me know if you run into any problems. Pics of any scripts are helpful for troubleshooting.
     

Share This Page