Scripted Sequence - Collision with Chair

Hi all. Again, another possibly stupid question - though I’ve been playing around with this for a while to try and fix it but to no avail so far.
Right now I’ve been trying to figure out scripted sequences to get scientists typing away etc. in the background in labs. However, when I place the scientist with the scripted sequence in the sitting position on the chair (which is a prop_dynamic_override, as I saw was used in Anomalous Materials for a similar ‘typing’ sequence), the scientist collides with it or something, because when I see him, he is standing up (usually inside of the desk). However, when I move him and the scripted sequence away from the chair in an empty space, he performs his sequence fine.

Thanks guys! Hopefully it’s a simple fix though I haven’t seen much info about this with my searches.

This is odd, certainly. I’ve never had that problem so I’m not 100% sure what’s causing it, but here are some things you can check:

  1. Unless the chair needs to move, you are probably better off making it a prop_static with the office_chair_static model, instead of a prop_dynamic_override. That shouldn’t affect anything other than, I dunno, performance maybe, but I guess it could be the culprit.
  2. Is the scene configured so that the actor does not try to move to it? If it is, the scientist may be able to get to his mark properly when he is not stuck in the desk, only to try and fail when he is moved closer in. Static scenes like typing animations do not need to have the target move to them.
  3. Is the actor named specifically as the target, or do you just have a classname in the scene? The method Source uses to find an actor when only a classname is specified is finicky, and may change depending on where the scene and scientist are located.

It’s fixed! Thanks for the suggestion - the scripted sequence was set so that the scientist had to move to it - by walking. So I set it to “no” so he simply stayed in his place and it’s all good. (Though if I set it to “instantaneous” it would probably do the same).

Only problem now is that the keyboard and monitor (and anything in the vicinity) seems to collide with the invisible scripted sequence block - or perhaps it’s the NPC. There seems to be an invisible box around the NPC, so it’s pushing the keyboard and monitor against the wall.

That would be the NPC’s bounding box. You can prevent the collision effect by setting the computer components that are involved to “debris” on their spawnflags menu.

Also, if the scripted sequence is set to “don’t move”, it can be anywhere on the map relative to the NPC (have not tested for very large distances but I don’t see why not) and still work at the NPC’s location. “Instantaneous” will of course teleport the npc to the sequence, so you cannot use this functionality that way.

It’s all working perfectly now, thanks! Set the keyboards to debris and all good.
Yes, setting the scripted sequence to “don’t move” is very useful, as I don’t have to make sure to align the sequences with the NPC and so forth…
Just one thing - would there possibly be a way to start sequences automatically, without triggering? I set the sequence’s flag “Start on Spawn” ticked but it still needs a trigger.
Thanks again.

I don’t know quite what to say to you there, ticking “start on spawn” always worked just fine for me. You’re sure that the animation you want is set as the action animation, and there is nothing wierd in the idle, post idle, etc. fields?

I don’t mind triggering it anyway, though I’ll look into it. Thanks!

“Start on Spawn” is a misnomer. It really means “Move to position on spawn, then play idle animation until BeginSequence gets called”.

So, setting the animation as a pre-idle animation should do the trick.

Great, I’ll do that then! Thanks.
Now - I’ve got scientist doing a scripted sequence of her pressing buttons on a console. This needs to be looped. There seems to only be a setting that says “loop action animation” so if I put the animation in Pre-Idle would that still work?
Also, I want the player to trigger the next sequence for the scientist - so that she walks to another console (as I can’t find an actbusy.txt) but because she’s looping her animation she doesn’t begin the next sequence when triggered (I’ve set it up so that it knows what the next sequence is, and she would walk to it etc)
Thank you - can’t try this out right now however!

I’ve had no problems at all using the start on spawn flag with blank pre action idle, entry, and post action idle animations and the animation I want in action animation. Perhaps it matters that I have deselected move to position and selected loop action animation. It may also be relevant that I do not name my scripted_sequences, as naming some entities like lights can alter their behavior.

Regardless, you may want to experiment with the begin_sequence and cancel_sequence outputs, as well as addoutput. I’m not sure what changing the values of a scripted sequence mid-animation does, but it’s worth playing around with.

I got rid of the names for each scripted sequence, and they start automatically now. Interesting!

That’s really interesting. Also kind of stupid, in my opinion. Lights I understand, but scripted sequences? Hmm…

Yep, very weird.
But now, onto another problem - elevators. I know all of you are probably tired of seeing all my questions, but I’ve got one last problem - making the elevator move down/up with all of the objects inside.

As you can see, there are quite a few props inside, including light entities. There are also doors attached to the elevator which need to move down with it, and a vent etc.
I’ve tried various things by looking on YouTube - making the elevator act as a ‘door’ with an open and closed state (to move to both floors), and I’ve tried using the tracktrain and path entities to move it down, but I can never get everything to move with it- and one time, all of the props moved down but not the actual elevator.
I’m thinking of making it simply ‘teleport’ the player to a clone of the elevator on the bottom floor, and somehow making it not look obvious (like the ‘monument’ entity for loading maps - keeps the player in the same position)

This is probably my biggest annoyance so far, and hopefully my last. I’m new to this so apologies for all of the questions, but you guys are far more helpful than a wiki article or a youtube video which might not answer my question.

Thanks!

I recommend using invisible doors rather than trains for elevators. Much neater, in my opinion, and also doesn’t mess up nearly as much when trying to handle reverse movement. The exception, however, would be if you’re attempting to create a multi-stop elevator. Then I’d recommend using a train.

To get things to move with your elevator, just use parenting. Is there something obvious that I’m missing here about your setup?

Alright, I tried again using the door method and it worked! Everything moves down together.
However, to make it go down the full length of the elevator shaft, I had to add on an invisible block as part of the func_door that went down to the bottom floor, because func_doors only move the length of themselves before stopping.
And now, I’ve just got to get the doors to open when the elevator stops moving. Any ideas?

… Is there a problem with simply firing the Open input when your invisible door fires OnFullyOpen or OnFullyClosed?

Well, I’d recommend from the start using a trigger_teleport, but (while it’s terrible practice) you could also have the elevator button open the doors after a delay timed to synchronize with when the elevator stops.

No problems at all! It’s these simple things that are sometimes glossed over in map making, thanks.

Admiral, yes, I could have used a trigger_teleport from the start but now I know how to make elevators it’ll be useful for future maps!

Well, it’s always a good idea to get conversant in multiple methods of doing things where available, and in this case a properly configured trigger_teleport would be more efficient…

But regardless, I’m somewhat interested in seeing how your cubemaps and lights react to the moving elevator entity.

Depends on what you mean by more efficient. The teleport has a few downsides to it, namely any held objects won’t transition with you (and if you configure them to come along with you, they’ll immediately pop out of your hand), and neither will bullet/scorch marks. If those aren’t a concern, then sure. Go right ahead.

Also, there appears to be a vent in the ceiling of that screenshot. A teleport would make that look veeeeeeeery suspicious.

Basically, it depends highly on what exactly you’re trying to accomplish.

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.