[WIP] Stronghold Objective Scripting Problem

Discussion in 'Halo and Forge Discussion' started by Fythic, Aug 5, 2016.

  1. Fythic

    Fythic Legendary

    Messages:
    15
    Likes Received:
    5
    I'm in the middle of trying to create an invasion gametype but I ran into two problems with scripting.

    I would like for a stronghold point to spawn then despawn 2 seconds later, but for some reason the stronghold won't spawn in the first place. The way I set it up is with a controller (2x2x2 detailed block) which contains these scripts:

    SWITCH:

    Script 1: On Interaction - Power: Set - Bravo --> On

    2x2x2 BLOCK:

    Respawn: On - On Death/Deletion --> 2 seconds.

    Script 1: On Power: State - Bravo - On --> Despawn
    Script 2: On Spawn - Message: Send --> Bravo

    STRONGHOLD TERMINAL:

    Script 1: On Round: Start - Despawn
    Script 2: On Power: State - Bravo - On --> Spawn
    Script 3: On Message: Recieved - Bravo --> Despawn

    To re-iterate, the Issue here is that the stronghold starts despawned, but it won't respawn. Is it not allowed to spawn due to the game engine?

    On top of that, I also want a door to move over the course of 15 seconds, but I want it to reset if you re-activate a switch. Here is the setup for this:

    SWITCH:

    Script 1: On Interaction - Power:Set - Alpha --> Toggle

    32x32x2 BLOCK:

    Script 1: On Power: State - Alpha - On --> Move: Offset (numbers here).
    Script 2: On Power: State - Alpha - Off --> Position/Rotation: Reset (Velocity: Reset - On).

    The problem with this is that if i re-activate the script before the Move: Offset finishes, it resets back to normal position but still continues to finish the Move: Offset until IT finishes too. Is there a way to purge all movement so that the reset can do it's work?

    If i need to clarify, ask me and I'll try. Thanks Forgehub :)
     
  2. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    instead of doing a reset, you could have it despawn and respawn. I think.

    As for the switch... I don't know if you want to do power. My experience with power is that it's a constant state. So you might be constantly despawning the block because I think scripts may override the spawn timers (I know that proximity certainly overrides it, for example - something won't respawn if you're too close). Try having the switch send a signal on interaction and having the block and terminal respond to that signal instead.
     
  3. Fythic

    Fythic Legendary

    Messages:
    15
    Likes Received:
    5
    So I played around with the reset a bit more, and I tried what you did and while it DOES do what I need, I forgot to mention that it needs to do it over 4 seconds. With that said, I found a solution.

    I found out that you can override a movement command with another movement command which only moves 0.5 units over 0.1 seconds. This way, when my object slowly moves back into place, it'll stay as intended.

    Still having problems with the stronghold, though. I'll look into some more tests soon and report back.

    If I get this working, I have a very pseudo-invasion gametype made.
     
  4. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    If you can't spawn in the zone due to the engine - which is entirely possible - maybe you can move it? so you could have it exist outside the map or something and then move to where you want it to be.

    I would try experimenting just a smidge to see if it even can spawn in, like start it despawned, set it to spawn when it receives a signal, and put that signal on a switch. If it works great, work on the scripting - if not, work on a workaround.
     
  5. Fythic

    Fythic Legendary

    Messages:
    15
    Likes Received:
    5
    You're very correct. I found out that the stronghold base spawns and despawns correctly when I'm in forge, but it doesn't in custom games.

    A problem is that it needs to spawn, stay for two seconds so you are given a point, then despawn. I'm thinking that if I move it fast enough past the area so that the player is given the point then have a scripting brain make it despawn right after that, then my issues are pretty much resolved. I'LL BE BACK SOON. THANKS FOR THE EXTRA BRAIN, RETHAL <3
     
  6. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    You got it Fythic. Good luck
     
    Fythic likes this.
  7. Charybdis

    Charybdis Legendary

    Messages:
    70
    Likes Received:
    56
    That's actually a REALLY good idea for a POI Icon!
     
  8. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    ^a what?
     
  9. Fythic

    Fythic Legendary

    Messages:
    15
    Likes Received:
    5
    Hm, turns out if you capture a point then the point despawns, you're still given points even though it doesn't exist. I don't know if there's a workaround for this.

    EDIT: I thought of an idea but instead of strongholds it was CTF. I'm going to try this out.
     
  10. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    Sounds like probably not if preventing points is a big deal to you. You could adjust the points in the game though? Idk I haven't looked at stronghold's options and I know they fkin limited us badly but maybe in the game settings there's a way.
     
  11. Fythic

    Fythic Legendary

    Messages:
    15
    Likes Received:
    5
    It's so annoying switching between custom games and forge so much, the load times >.>
    BUT, I think I got a working type, but the HUD won't tell you if you've captured a point or not, so I might make a visual representation.

    The way it works is that you start a sequence where it opens a door over 15 seconds and if anyone re-activates the switch, it will reverse the process. If you get past the 15 seconds, you're allowed in and then you grab a flag that's inside and then activate a switch which drops you into a hole that gives you a flag capture along with a death, then blocking off the area. This is as close as I can get to Invasion, but I think it's a fairly comprehensive gametype if everyone knows what to do, just like Honors Infection before infection came out.
     

Share This Page