Is there a key difference between image states and schedules

Author Topic: Is there a key difference between image states and schedules  (Read 1450 times)

Ive never experimented enough to see a key difference between the two. I was wondering if anybody has had significant experience with both in terms of how they queue up / if lag has any effect on one over the other.

I've seen weapon states queue up during lag (i.e., full auto weapons turn into shotguns because the fire state is called a bunch during a period of lag) and I was wondering that if I were to make a pseudo state system using schedules, would there be any drawbacks? can schedules sometimes deliver in the wrong order due to lag, or will they just be identical to states and queue up until the lag ends

Practical use: using mounted bots as guns, allowing variable fire rate, etc.

Ps. Some people have suggested I use an invisible image to run states on the bot weapon, but I am interested in skipping that part entirely




« Last Edit: December 05, 2017, 05:57:58 AM by PhantOS »

I've experimented with weapons using schedules and lag before.



I haven't had any problems with lag before, as you can see the stab animation / function above are completely separate from the weapon image mounted in the players hand for the swinging attacks. It's just a bot in my hand being affected by the schedules.

Another weapon that uses schedules is my Roada Roller Da. From what I've seen, lag only causes the schedules to all play at once, just like image state lag.

The only problem I've noticed with schedules is incorrect timing of particle effects / sound effects, but that's only if you lag and you'd have the same problem with image states anyways, so I think it's safe for you to use schedules for what you're trying to do.

I don't know much about animating, but would you have no control over how fast or slow weapon animations play? I know in the state system you could change it with the state timeout values

Ah okay, thanks darksaber

I don't know much about animating, but would you have no control over how fast or slow weapon animations play? I know in the state system you could change it with the state timeout values
image animations don't work outside of states. in this case I use playthread, which just plays a player animation at whatever speed is in the dsq I think

I think it's because the states are bound to the client's connection, so if they lag, their states wont transition, just as their player also doesn't move, etc.
Schedules are completely independent of this. However I believe it ends up using more processing than states do. As well as losing the things like animation speeds and such.

Though I've always wanted to play with the idea as a mounted bot for a weapon, and in fact, I have before. This allowed me to dynamically mess with the size of the weapon, as well as changing it's colors, and giving me better control over the vectors produced by the weapon. It would be really neat to have a customizable weapon using nodes and such.



Note that: It is entirely possible to have variable fire rates with states, using the ammo/loaded mechanics.

holy stuff a magic sword

I'm guessing for that you used a player type in addition to a bot

holy stuff a magic sword

I'm guessing for that you used a player type in addition to a bot
Yes.

melee anims playertype im guessing

image states are all transferred to the client and have client interpolation on them
projectiles created on a fire state are client interpolated also, you'll notice if you create projectiles you may notice it takes them a fraction of a second to ghost to the player even if you are the host and they will appear to start later then they actually are

also images can have eye offsets and first person/third person models

if you want a mounted object to appear in first person you'll probably need to mount that bot to another empty bot to the player's hand