What is IsFirstExecution doing?

Options
I don't get my head around this. It seems to return true all the time.

Could someone explain me what this property is doing?

Comments

  • stanchion
    Options
    http://doc.photonengine.com/en-us/bolt/current/reference/boltentity

    "What is BoltCommand.isFirstExecution used for?

    Code which perform direct actions from your commands, for example firing your weapon or setting the animation state - should be wrapped in a block that looks like this:

    Since on a remote controller ExecuteCommand will be called several times for the same command, if you don't check so that things like animations and other direct actions only happen on the first execution - your character will act very weird on the remote controllers."
  • silentneedle
    Options
    I've read that, but I don't understand what is meant by "first execution", code inside isFirstExecution seems to be called every time, not only on the first command received.
  • roywax
    Options
    Hello,
    I also am getting true all the time for this command, anyone know what am i doing wrong?
    Thanks
    Roy
  • stanchion
    Options
    roywax wrote: »
    Hello,
    I also am getting true all the time for this command, anyone know what am i doing wrong?
    Thanks
    Roy

    If you're playing on the server and have control of an entity then this will always be true. Otherwise as client you'll see this every frame.