[Scripting] Bug with sending repeated messages?

Discussion in 'Halo and Forge Discussion' started by Ray Benefield, Aug 17, 2016.

  1. Ray Benefield

    Ray Benefield Godly Perfection
    Forge Critic

    Messages:
    1,183
    Likes Received:
    518
    So I want to know if anyone else has experienced this, I mentioned it in WAYWO but nothing. I want to use this thread to draw attention to it for the Forge team. It seems that when you send a message down the same channel... every 2 or 3, the message gets dropped. And it seems to be a consistent drop in messages. Every time I load up the custom game it is the exact same message that gets dropped and as the switch is hit multiple times, some of them don't get registered.

    I can build a reliability system in using power channels to verify when a message was sent and when it completes in order to enable resending the message if it fails, but that is overkill and wanted to see if we could get it fixed instead. It seems the same problem showed up in this video:

     
  2. ReinaStorm

    ReinaStorm Nostalgia never dies
    Senior Member

    Messages:
    222
    Likes Received:
    444
    As far as what I've experienced with scripting with the "Send Message", there seems to be a "cooldown" or delay timer that maybe prevents the message from being sent too often. This may possibly be a safeguard to prevent overspam of send message to prevent crashing forge.

    It may be just a few seconds after the message is sent AND whatever the sent message was scripted to do.

    This is just what it seems to be like to me.

    It may be a bug in forge, or it may be a crash-prevention cooldown.
    I have little experience with major amounts of scripting in Forge, so my thoughts may be of little help.
     
    Ray Benefield likes this.
  3. Ray Benefield

    Ray Benefield Godly Perfection
    Forge Critic

    Messages:
    1,183
    Likes Received:
    518
    Yea that was something I was thinking at first. But even 25 seconds apart, the messages still don't go through. So I think it is something else.
     
  4. Yumudas Beegbut

    Yumudas Beegbut Legendary
    Wiki Contributor Senior Member

    Messages:
    393
    Likes Received:
    352
    Is it for a move action? I think the move and maybe the rotate action sometimes ignore every other call. Haven't played around with that yet. I'd explode something when it receives the same message as a test. Prolly a Phaeton. Elitist hovering prick cars.

    I often end up using a pair of move (or rotate) scripts that do the same thing since one can't be called while it's running or even during the cycle after it stops.
     
  5. Egggnog

    Egggnog Game Crashers

    Messages:
    267
    Likes Received:
    331
    I have yet to encounter this problem so I wonder if it's an issue with the map you're working on. Are you using a multi script? What operates on this message channel? I think this is only in very precise circumstances.
     
  6. Ray Benefield

    Ray Benefield Godly Perfection
    Forge Critic

    Messages:
    1,183
    Likes Received:
    518
    I'm using it for a physics trigger to simulate a resource pool. Basically it needs to move X times before hitting the explosive trigger. So since it is a move action perhaps I need to test sending two at the same time and I'll try the simultaneous explosions test to see if it has to do specifically with moving.
     
  7. Egggnog

    Egggnog Game Crashers

    Messages:
    267
    Likes Received:
    331
    Hmm, I don't think objects like repeated movement. Try using a power channel instead of a message, with the switch toggling it and the object moving on both power on and power off.
     
  8. Ray Benefield

    Ray Benefield Godly Perfection
    Forge Critic

    Messages:
    1,183
    Likes Received:
    518
    I would if it didn't reduce the amount of available channels. My whole mechanism only uses 2 message channels and 3 power channels, which allows me to duplicate it 8 times... actually I just remembered that I may be able to re-use some of the channels across all of the mechanism copies.

    So you are saying only move forward on power on AND power off as a multi-condition?
     
  9. Yumudas Beegbut

    Yumudas Beegbut Legendary
    Wiki Contributor Senior Member

    Messages:
    393
    Likes Received:
    352
    Wait! Is this a situation where a counter can be used?

    I pitched this one to @Wally12 for a video topic, so he's got dibs if he wants it and if people even care. <3

    I can't believe it took me all this time, but a few days ago I finally realized that we can use objects with health as counters. Use a message or power state change to tell the object to damage itself and then listen for the health to go below your target and do something.

    (On Message: alpha) {Damage Ratio: 0.01}
    (On Health Below: 0.91) {Message Send: bravo}

    That would broadcast on bravo after ten calls to alpha. Since 0.01 (1%) is the smallest amount of damage, the object can be used to count to 100. But since there's only 8 script slots for each object we can only react to 7 different damage levels at most.

    If, math permitting, you want the object destroyed for the final count then just divide 1.00 by the count. Works fine up through a count of 10, but not 11. Note: if the object is destroyed by the damage, the (On Health Below) condition doesn't seem to work, so your final count would be detected by (On Destroyed).

    If you need to reuse it and your setup allows, you can save a script by having the object respawn itself a second later, sometimes less if a Respawn time of 0 works. Otherwise, a Despawn script followed by a Spawn script works even at the same time. Last script wins, but both will fire and object has full health.

    I recommend using grenades since they're small, make no noise, and respawn quickly. But you can use:
    • Grenades
    • Destructible pallets
    • Destructible shields
    • Fixed turrets
    • Vehicles
    • Explosives
    • Maybe more
    Also can be used as a timer you can trigger whenever you want that can count game cycles in increments of 1/60 seconds. Beat that Timmy the Whale, Mr One Second Intervals!

    Else if (this ain't one of them situations)
    {****It();}
     
    Ray Benefield likes this.
  10. Ray Benefield

    Ray Benefield Godly Perfection
    Forge Critic

    Messages:
    1,183
    Likes Received:
    518
    AHHHH!!! I totally forgot health was a thing!!! I remember thinking this in the past with health and never actually having a use months ago for it. Now I do have a use and I forgot!!! That will definitely be useful as it gets rid of my entire physics contraption. I'm going to switch my mechanism prototype to use damage to see if that can rectify my problem.

    This may also make another mechanic that I wanted more viable. :) Easier setup is muy bueno. I'll get back to this thread when I figure out a new contraption. Thanks again you two.
     
    Yumudas Beegbut likes this.
  11. Ray Benefield

    Ray Benefield Godly Perfection
    Forge Critic

    Messages:
    1,183
    Likes Received:
    518
    WOOT!!! I tested it and the damage counter is a much more effective system it is extremely consistent.

    Now I wanted to visually show off how much of the "bar" is filled. Basically the bar has 3 slots and every activation fills 1 slot. When you activate it with all 3 slots filled, the slots empty and it triggers the reward. Originally I was going to use like an energy shield scripted to move and "fill up" the bar every time a message is sent, but since moving is quirky with messages then I probably need to find a better solution to display number of units then. Hmmm...

    Thanks for reminding me of the health system @Yumudas Beegbut ! Hugely useful for the gametype I'm working on and crazy simplifies things for the gametype setup. When I get this gametype working in a prototype, I'll definitely get you into some internal testing.
     
    Yumudas Beegbut likes this.
  12. TurbTastic

    TurbTastic Forerunner
    Senior Member

    Messages:
    185
    Likes Received:
    128
    It sounds like you are experiencing this:

    http://www.forgehub.com/threads/forge-bug-report.149452/page-16#post-1648392

    Objects on Phased physics set to move on a message received will only move with every other message. Objects set to Fixed physics do not have this problem. Here's how to recreate it:

    Phased Object : Phased physics, Message Received Alpha --> Move (non-invisible object)
    Fixed Object: Fixed physics, Message Received Alpha --> Move (non-invisible object)
    Terminal: On Interaction, Send Message Alpha

    Keep pressing the Terminal and observe how the Phased Object moves every other time you use the Terminal and the Fixed Object moves every time you use the terminal.
     

Share This Page