Scripting help: ignoring a script to run another?

Discussion in 'Halo and Forge Discussion' started by WagglyBeef, Dec 22, 2016.

  1. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
    So i have an item that is scripted to move back and forth on a timer, and i want it so that when a boundry is entered it will ignore that script and run a second script, and then when the boundry is left have it go back to the first script.
    Right now it seems to try and run both at the same time, anyone know how i might be able to fix this?
     
  2. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    Best guess is having the boundary turning on and off a power channel. You could have two script brains, that are only spawned while the channel is either on or off, and send a message on a rapid timer - then have the thing move on receiving the message
     
  3. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
  4. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
    Im getting close but i need to take a break maybe back on later or until tomorroe
     
  5. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    Yeah i forgot script brains can't spawn or despawn so it would take an extra item instead but you get the idea
     
  6. Agent Zero85

    Agent Zero85 Legendary
    Wiki Contributor Senior Member

    Messages:
    400
    Likes Received:
    435
    I can help, the best way is to use a multi.
    Hit me up sometime when im online and i can set it up for you.
     
  7. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    Can multi use a timer now?
     
  8. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
    Idk but im at that point like one more tweak and ill have it but i cant figure out what it is lol
    --- Double Post Merged, Dec 22, 2016 ---
    Will do and thanks
     
  9. Starship Forge

    Starship Forge Recruit
    Senior Member

    Messages:
    183
    Likes Received:
    140
    No, they can spawn/despawn. I've been able to get it to work. Maybe they couldn't before, but they can now.
    --- Double Post Merged, Dec 23, 2016 ---
    No, they can spawn/despawn. I've been able to get it to work. Maybe they couldn't before, but they can now.
     
  10. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    In that case my first idea should work. Multi condition will only work if they accept more than just power and message now... I suppose you could have something sending a message on a timer and have the power just flip on and off actually. No need to despawn anything.

    But that's how scripting goes! You figure out what works and then what works best. So yeah, you could have your thing on power on and message received move one way, then power off and same message received move the other way, and enter boundary turns power on, exit turns it off, with something else (or even itself) sending a message rapidly on a timer
     
  11. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
    I think you on to something im at work so cant test it but have it on a multi have it say on power alpha on and message alpha move left and on power alpha on and message barvo move right and have a despawn timer rig going and have it so that when boundry is entered power alpha off and message send charlie to run second script and on boundry exit have it turn power alpha back on
     
  12. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    ^ something like that. I don't know exactly what your implementation is so I don't know what you want it to look like but essentially you get the idea I think.
     
  13. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
    Once i get it sorted ill make a video of what im working on
     
  14. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
    Bits are a bit rough and through more finessing it would prolly smooth out but for the nost part i have a working spot light
     
  15. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
    Here it is
     
    fame28 likes this.
  16. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    Interesting! I see so you basically needed move left, move right, and don't move conditions. Nice work so far! Good rotational following for what we've got. Idk how well it will combine with actual following or multiple players but it looks like a good start
     
  17. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
    Yeah and its a bit jumpy going from following to just scanning
     
  18. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    Yeah I'm sure that's just a boundary thing though
     
  19. WagglyBeef

    WagglyBeef Legendary

    Messages:
    91
    Likes Received:
    53
    Im at work for another 6 hours but after that if you want to hop on halo we can test multiple people and you can come get a look at how the scipt is layed out
     
  20. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    I'll see what I can do. Lots of family stuff though
     

Share This Page