Jump to content

Make NPCs / player use furniture without the "enter furniture animation"


Recommended Posts

Good afternoon everybody!

 

Is there any way to make furniture (especially those diner table things) useable by NPCs / the player without the "enter furniture animation"?

So for example sitting on a chair without the actual "going from standing up to sitting down" - animation.

So that the player / NPCs goes from standing there next to the chair to just sitting down, without that transition animation.

 

Because usually, there are "entry points" for furniture. If a NPC or the player wants to use that furniture, they will try to go to that entry point and from there start the "enter furniture animation".

But in a confined space, that is really problematic. Because NPCs won't use the furniture if they can't reach the "entry point marker".

And you can't move the entry point marker without completely remaking the animations.

 

Also, it should be compatible with the "AI package" system.

 

There is probably some script function to "force" an NPC into using some furniture, but I want to have the furniture be usable when the NPCs are just "sandboxing" around ...

 

I want to have NPCs be able to sit in chairs or lay in beds without having to have lots of space around it.

I know it will look weird an "immersion breaking" if the NPCs just kind of "pop in" to the furniture, but I'd rather have that then no useable furniture at all.

 

Things like weapon workbenches and other crafting stations are easy, I can just make it an activator that will open the crafting menu when activated.

Link to comment
Share on other sites

You could create some proximity based scripts which use SnapIntoInteraction, but they (number of scripts registering for events) could be high overhead on the scripting system for a minor UX outcome. Cost/benefit deficit.

Link to comment
Share on other sites

You could create some proximity based scripts which use SnapIntoInteraction, but they (number of scripts registering for events) could be high overhead on the scripting system for a minor UX outcome. Cost/benefit deficit.

Yeah, but that wouldn't work with the "AI package" system.

And if any NPC was just walking past the furniture (through that triggerbox) they would "get sucked into" the furniture.

Link to comment
Share on other sites

AI packages can have imbedded scripts (on start, on end, on change) and I have certainly seen AI packages with such scripts doing snapintointeraction (e.g. FollowersCompanionVertibirdSnapIntoPackage),

so it may be possible to make a standard AI Idle package that 'warps in' the NPC to the furniture as part of it (based on standard package conditions).

Is that what you are thinking of?

Link to comment
Share on other sites

AI packages can have imbedded scripts (on start, on end, on change) and I have certainly seen AI packages with such scripts doing snapintointeraction (e.g. FollowersCompanionVertibirdSnapIntoPackage),

so it may be possible to make a standard AI Idle package that 'warps in' the NPC to the furniture as part of it (based on standard package conditions).

Is that what you are thinking of?

Yes, that sounds like it!

For example:

An AI package that at a certain time (lunch, dinner, ...) makes the NPC walk to a certain spot (x marker that I will place near the furniture) and then will "snapintointeraction" into the furniture.

 

But how would this work on "exiting" the furniture?

If the "entry / exit" point of that furniture is no in a "reachable place" ("inside" of anohter object, ...) ?

 

Getting the NPCs into the furniture is only half of the problem ...

Link to comment
Share on other sites

I know dismount() will force an NPC to exit from furniture, but probably standard package steps will do the same.

I suppose another Idle package (with conditions that mean it only works if NPC is 'sitting' in that furniture) would do the job (using above options) - but now your AI package stack is getting bigger.

You can have multiple sequential steps in a package, each with conditions, but I don't think you can add scripts to individual steps.

Link to comment
Share on other sites

I know dismount() will force an NPC to exit from furniture, but probably standard package steps will do the same.

I suppose another Idle package (with conditions that mean it only works if NPC is 'sitting' in that furniture) would do the job (using above options) - but now your AI package stack is getting bigger.

You can have multiple sequential steps in a package, each with conditions, but I don't think you can add scripts to individual steps.

But where will that "place" the NPC after "popping out" of the furniture?

Probably at the entry/exit point of the used furniture, right?

 

Is there any way to have the NPC "pop out" to a XmarkerHeading or something like that?

Link to comment
Share on other sites

Good point - how do you specify the 'furniture exit' idle? That is the mysterious bit to me too.

Somehow exit animations get invoked (so 'travel to xmarkerheading' could be one), but I don't know how animations are connected to a package procedures in the first place.

What I see is if the actor exits the furniture (via scripted dismount, or some package step that has the actor not be sitting) then the appropriate animation (ActionInteractionExit of FurnitureBehaviour.hkx in this case) is invoked.

Somwhere internal to the game there is a connection between these package procedures and the actor Idles.

 

In the ones I use to dismount from the 'sitting' in the Vertibird, it is the 'travel' procedure in the dismount package that makes the actor get up and move away.

The built in parameters on the "travel' procedure allow you to specify the "dismount location" - which sounds like what you want.

 

Though obviously you still need the appropriate ActionInteractionExit idle to exist that matches the actor & furniture combination you are working with.

Edited by PJMail
Link to comment
Share on other sites

Good point - how do you specify the 'furniture exit' idle? That is the mysterious bit to me too.

Somehow exit animations get invoked (so 'travel to xmarkerheading' could be one), but I don't know how animations are connected to a package procedures in the first place.

What I see is if the actor exits the furniture (via scripted dismount, or some package step that has the actor not be sitting) then the appropriate animation (ActionInteractionExit of FurnitureBehaviour.hkx in this case) is invoked.

Somwhere internal to the game there is a connection between these package procedures and the actor Idles.

 

In the ones I use to dismount from the 'sitting' in the Vertibird, it is the 'travel' procedure in the dismount package that makes the actor get up and move away.

The built in parameters on the "travel' procedure allow you to specify the "dismount location" - which sounds like what you want.

 

Though obviously you still need the appropriate ActionInteractionExit idle to exist that matches the actor & furniture combination you are working with.

Yes, that's how it works, I guess ...

Basically whenever an actors wants to exit the furniture, an animaton plays. After that animation is done, the NPC will end up at the "entry/exit" marker of the furniture.

 

I need to "bypass" this.

 

So basically instead of that animation, "teleport" the NPC to an X-MarkerHeading.

 

But I think the sequence of those animations (enter furniture, using furniture "idle", exiting furniture) can't really be changed, right?

Because that's what I would need to do ...

 

To have it like this: ........ , using furniture "idle animation", teleport to xmarkerheading.

 

(The "enter furniture" doesn't matter, because that can be done with a script.)

Link to comment
Share on other sites

Have you tried producing your own variant of those travel packages?

I ask because you can specify anything you want as the destination of the dismount - for example an xmarker.

The destination is a location and a radius - isn't that exactly what you want? Dismount and move to a location?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...