Animation - arm wrestling?

Thank you, @4760! I’ll try it out soon. Right now I’m dealing with failing sitting animations yet again.

Yes @andgalf, I noticed… Good luck! Maybe you could use “JumpToLocation” and then the code for the sit down action with just a 0.01f delay after JumpToLocation? I fixed a similar issue I guess for the arm wrestling.

1 Like

I’ll try it.

Man, you’re a genious! It worked with that simple addition.

Tried your test module for this @4760. For me, both the PC and the opponent sits down on the same chair so it looks pretty odd. Wonder why that is…I mean, in your pictures it looks good.

Oh yes. It was fun the first time, but not after.

Me too. All the more so as I tried several times again, and it worked 100% of the times. I even checked the time the module was last saved to verify I did share the latest version.
That reminded me I forgot to explain that the three .gr2 files have to go to the documents “override”.

Time to go to bed for me, but just in case: do the PC and the NPC always sit on the same chair? If the answer is yes, maybe try with SetFacing() with the same direction for them (although I can’t see why you should have to do this!)
The only other reason, more likely technically but still not understandable is that the waypoints set below the chairs have the same name (again, I can’t see how this could have happened).

@4760,

PC & NPC sharing the same chair …

Just make sure you are making sure that any function you are using to determine where to sit takes into account any chair that may already have been set as occupied to use.

e.g. Using something like GetNearestObject may be returning the same object for both creatures.

This is why I rather use unique waypoints, so there’s only one instance to be found. I’ll have another look at their tags though, thanks for the reminder.

I’ll try and tamper a bit with your module 4760 and see if I can find some way to make it work, but that will be in about an hour. I’ll have some other things to do first.
And yes, I put your animation files in the override (I just assumed they were to go there, and apparently I was right).

@4760 I think I found the problem in your script:

DelayCommand(0.5, AssignCommand(oPC, JumpToObject(GetObjectByTag("NW_BRASDEFER"))));
DelayCommand(0.5, AssignCommand(oBevil,JumpToObject(GetObjectByTag("NW_BRASDEFER"))));

Edit: This is odd. The script doesn’t compile. No wonder it doesn’t work ingame.

Edit 2: It was these lines that didn’t compile:

DelayCommand(11f, SetCollision(oPC, TRUE));
	DelayCommand(11f, SetCollision(oBevil, TRUE));
	DelayCommand(11f, AssignCommand(oPC, ActionMoveToObject(GetObjectByTag("WP_PC"))));
	DelayCommand(11f, AssignCommand(oBevil, ActionMoveToObject(GetObjectByTag("WP_BEVIL"))));

I changed them to:

DelayCommand(11.0f, SetCollision(oPC, TRUE));
	DelayCommand(11.0f, SetCollision(oBevil, TRUE));
	DelayCommand(11.0f, AssignCommand(oPC, ActionMoveToObject(GetObjectByTag("WP_PC"))));
	DelayCommand(11.0f, AssignCommand(oBevil, ActionMoveToObject(GetObjectByTag("WP_BEVIL"))));

Edit 3: Eh…that didn’t solve it ingame. Weird.

Hmmm, ok. So the lines where they jump to NW_BRASDEFER (which I thought was wrong) was right after all. My bad.
But still it doesn’t work. My guess is that it’s the setfacing that doesn’t work.

I got it to work almost now. I placed another waypoint under the table facing the other way, so that the don’t jump to the same waypoint when the arms are going up. The arms don’t quite meet yet though. Will fiddle with that a bit.

Edit: Now it looks quite alright. What do you think @4760?

https://drive.google.com/file/d/1n2GRafQYRULHPkrk4QNfc-yc19Hfxs70/view?usp=sharing

I added some unnecessary code to your script. Sorry about that. But I thought I might need that in my own module when I try it there.

Er … Even if you use different tagged waypoints for the original jump, is it possible they still find the same chair? i.e. Do you ensure the chairs have different tags? Or do you make a creature do the animation at a WP rather than a chair object? If so, isn’t it easier to just jump to a specific tag chair rather than a WP, then sit on the chair?

@Lance_Botelle If you download and look at it in the toolset (4760’s first version) you’ll notice that the characters aren’t interacting with chairs but instead with the waypoints themselves, at least as far as I can see. I don’t know if it’s preferable to interact with the chairs themselves, but after my tweaking, by adding another waypoint, and doing some small changes in the code, it is now working, at least for me.

@andgalf,

OK - I’ll take a look and see how he is managing it. :+1:

OK - I am blind! I found it now.

If you’d like, take a look at my version too, where I got it working. I’m not using the interaction with chairs either, even though maybe…I don’t know…it would work just as well.

@andgalf

OK, I’ll grab that too.

EDIT: OK, I also confirm that the original script does not compile (as andgalf says 11f > 11.0).

@andgalf Your script does compile.

I will now take a closer look at the actual working and report back.

EDIT 1: On first attempts (after ensuring script would compile), I get some odd results. The animation of Bevil looks good, but the dwarf I am using just stands there. (Maybe only works with humans? I will test with a human. UPDATE: Maybe you already say above, but I confirm it works with a human.) I get the same result in both mods. I am going to look at the scripting again - and (just to offer another alternative), provide another version to look at.

@Lance_Botelle So it didn’t work for you in both my version and 4760’s version? Or did you mean it works in both versions?

Yes, a dwarf wouldn’t work. As it is in my chapter 4 module you can only be a human or a half-elf due to story reasons. That’s why 4760 didn’t make it work for dwarves.`

I’m going to try it out in my chapter 4 module now. I hope the module won’t explode.

LOL! And it did. The game crashed for me when attempting this ingame in my chapter 4 module. Odd.

Edit: I had made a mistake with the script. Forgott to change GetEnteringObject to GetFirstPC that’s why it crashed. Now it worked and looks quite good. Only thing that is not looking that good is when they move away from the table. They walk through the table at that point. Understandable since the table is walkable and probably needs to remain so.

I think I’ll use FadeToBlack again.

Or “JumpToObject” to a waypoint near the table?

Both, I think. :slight_smile: