Star Citizen: Bugsmashers! - Temperamental Turret
Transcript — every row opens the video at that moment
- 00:00:16
Everyone, welcome to Bug Smashers. I'm your host Mark Abent. Let's get smashing. Bug Smashers! Hey everyone, we are here in my fun little test mark level and we are looking at the hurricane today. And we have a little bug that we got from uh Tech Design whereas they're trying to set up this back-end turret. It's still a little bit incomplete, but we're working on uh setting this up. They have a little I can get my Come on, stop moving. Zero G. Hard to enter. Enter the turret. Oh, there There it goes. Bug mates. As we enter this turret, does some animations states. As you can see, it's still work in progress. However, we get to a point where the animation stops and
- 00:01:06
I am fully well, broken. Uh not a good fun thing. Um what's happening here is we're trying to split up the states of the animation so that we could recycle a bunch of them throughout all other ships. Uh currently for legacy long long time ago reasons, we had a enter state, idle state, and exit state. The enter state would basically be the turret coming down, you get in it, it goes up, and then you're idle. Um we since broke it down to now there's a uh deploy state I'm sorry, retract state where the turret comes down, then there's an enter state where you go in, and then there's a retract where it goes up, then you kind of select it and you're idle handy-dandy. And in this phase, we successfully did the uh retract, the enter, the deploy.
- 00:01:55
Uh actually, we didn't even get to deploy. As you can see, we're stuck in the retract state. It's infinitely just never finishing. Um, so we're never even getting to the select base. We're just going up and stuck. And what's happening here is in the actual code, so we'll swap over to the amazing code, it kind of takes the player, takes the seat, and kind of enslaves them together so that they sync up their animations. And in this particular area of the code, it's waiting for the player to finish his animations before continuing on to the next state. However, um, the player will continuously animate because he's looping. So, it the code's not considering that he can loop forever. It's like, "Oh, the seat's done. Let's just wait for the player. Oh, wait, the player's never going to
- 00:02:43
finish cuz he's in this looping animation." In fact, when you're in this retract, the player's kind of like in this little, "I'm waiting for the seat to go up." But, he's continuously doing that, and well, he never breaks out. So, we need to break him out of there. So, in this fun little update section, we are going to check to see if we're in a looping animation. If we are, we need to basically go, "Oh, once the seat's done, we're done." So, we only care about this in the Let's copy this guy. do do Ah. I can't copy. There we go. about the deploy and in the retract state. So, anytime this turret is deploying or retracting, we need to see if the animation is in a
- 00:03:32
loop state on the actor. So, we have this bit of information in the seat stored in this thing called a scope slot. Um, there's a bunch of scope slots. There's the actor dashboard, vehicle, and then act- There's two different ones for the actor cuz there's two different implementations, but basically, we just want to know about the synced actor. So, if we're in a synced actor and basically there is an animation for him. Let's see. Oops, scope slot. Do we have an animation? Do we have an animation? Now, we're going to check to see if uh that animation sub-animation, I should say. Um this
- 00:04:21
slave action is more than an animation. It's It could be an animation with sound and a movement and it's a bunch of things all into one. We consider an animation cuz most likely it is animation, but it can be more things. However, from this action we need to actually get the animation if that's not confusing enough. So, we're going to be like, "Hey, scope action, tell me what your animation is." So, Mr. Action, let's get our scope. Do do do do. Let me get the scope context. So, the scope context is kind of like um in I guess how you'd say in Photoshop, I have layers. The root scope is the root layer, the top-level layer that's playing. So, we want to get the top animation from that.
- 00:05:10
Do do do get top animation. We're going to get the top animation. And we are technically looping if this Oops. Double pointers, never fun. Let's point to a pointer. So, we just need one pointer. We have an animation and this animation is loops, then basically we need to set this boolean to true. So, now if we're deploying or retracting and And player's in a looped animation, We are going to basically run down here and go our current state is not finished. We're still running code. However, we have finished. And we're a
- 00:06:00
looping animation. So, basically uh in this case um it will be like, "Yeah, we're done." it will traverse to the next state because Ha, actually this one. So, this first one will only run if the all the um sub actions are done and we're not looping. But, if we are looping and we're finished, then we continue on to the next layer. So many ifs in an if statement world. So, let's hit recode. All right, recode's finished. Let's hop back in game. And as you can see it finished. He did the select animation. Now, he's in idle. So, if I leave
- 00:06:49
He He's playing all the animations. Let's do this in slow motion. We'll scale everything half the speed. Enter magical turret. There we go. Magical turret is entering. So, we're going to scale everything down. Dude, length. We are in the retract state. Select state. Idle state. And we're good to go. Now, obviously, this just sets up the states so that they traverse correctly. There's still a bit of work to get all the IK and animation set up right for like the entering and all that. But, you get to see a good old work in progress. And I hope you guys enjoyed. So, as you guys saw, we had a fun little issue with
- 00:07:37
the split up animations where um because the player was looping, he was getting stuck in the retract state. So, we just had to make up some code to basically say, "Hey, if the seat is finished, the all the animations are there and the player's in this looping animation during the retract and deploy state, we consider it good to go and we could go to the next state." So, then the guy's like, "Ooh, I can grab onto my joystick and go." And as you saw, we still have this a little bit roughed out cuz it's a work in progress to get the Hurricane there. However, now I can take what I have and pass it up to the designers and they can continue it on. And I hope you guys enjoy. Till next time. Thanks for watching. For the latest and
- 00:08:27
greatest in Star Citizen and Squadron 42, you can subscribe to our channel or you can check out some of the other shows. And you can also head to our website at www.robertsspaceindustries.com. Thank you very much for watching.
Transcript from YouTube’s automatic captions — punctuation and Star Citizen jargon are approximate. The video itself is hosted by CIG on the official channel.

