Scripting Help- Rotate: Offset n00b

Discussion in 'Halo and Forge Discussion' started by Diego Eternal, Mar 17, 2019.

  1. Diego Eternal

    Diego Eternal Spartan III

    Messages:
    2
    Likes Received:
    9
    Forgive me if this topic has been discussed in the forums already but my search of the interwebs has come up dry.

    My Goal:
    Script a parking toll gate to open and close based on proximity. Get close to it, it rotates open, walk away it closes.

    Problem:
    The parking gate is essentially 2 pieces, a ceiling accent welded to a pivot with the pivot as the parent. This allows the accent to rotate around the pivot nicely. When my script is triggered, the parking gate spins continuously around it’s axis. When I walk away, it reverses direction. Not what I want.

    My Script [Fail]:
    I figured using a similar technique to the sliding automatic doors through a script brain and boundaries would work, simply swap move: offset with rotate: offset... I provided a really brief video that runs through my set up and the end result [Fail!] a second video shows that after a minute or so of the gate spinning wildly on its axis, it breaks free of its position (its phased physics...) and falls off the map. Not sure how I broke it so hard. WHAT AM I DOING WRONG? I don’t understand why it moves no stop, how can I get it so that it moves about 70° and stops and is able to return to its original position?

    Let’s go to the Tapes:

     
  2. ZombieDyer

    ZombieDyer Legendary

    Messages:
    992
    Likes Received:
    920
    I'd have to look at it in game, and I'm no script god. But that looks like an offset glitch, not a problem with the script. Its happened before where an item won't stop rotating/moving in a direction regardless of the amount you set it to.
     
  3. ZORO

    ZORO Spartan III

    Messages:
    15
    Likes Received:
    3
    Diego what is the name of your map so we can go on it to help figure it out.
     
    #3 ZORO, Sep 24, 2019
    Last edited: Oct 1, 2019

Share This Page