Hi! I created a stone model of a chair. Added all the necessary effects, dummy objects, and connections to it. Uploaded a file to my hak. I wrote a script that puts the character on a chair. But the problem is that the character still sits facing East! No matter how I turn the chair model in a three-dimensional editor, the game still sets to the East. I compared the objects in the model of my chair and the standard resource that it works with, in this case the couch, all the same, except for the effects and animations, because my chair is made of stone. But even if I just tie my model to the frame of objects from the couch, in the game the character still sits to the East. How do I fix it? Maybe there is a 2da file where you need to register my chair? But I didn’t find such a 2da file. Help!
object oPC = GetLastUsedBy();
object oChair = OBJECT_SELF;
if (GetIsObjectValid(oChair) && !GetIsObjectValid(GetSittingCreature(oChair)))
else if (GetIsObjectValid(GetSittingCreature(oChair)))
AssignCommand(oPC, SpeakString("А куда садитьсЯ? На руки, что ли?"));
you need a correctly positioned pwk file so the chair user will be properly positioned. let me make up something visual… (be back in a bit)
The solution is discussed here.
Alright here we go…
I’m not a scripter so I cant suggest a scripting fix, but here is what worked for me
and since you made a chair. A physical fix might work for you
Could you please send here the explanatory text of the image above? My English is poor. I can only write to you using an online translator. Thanks!
I did as you said, sorry, but it doesn’t help. Can you send me an archive with your model of the throne? Is there an incorrect structure or object associations in my file? Thanks!
p.s. Maybe there aren’t enough objects in the scene? Adding dummy “use01” and binding it to the parent object did nothing.
What are these dummy objects and what are they related to? With a parent object, or a model?
You seem to have the .pwk correct. Did you try your chair in the game? if not, add your new files and try it like you did with the first picture. Post a picture of how it looks in the game so we can see what else we can do.
Those cubes came with the base game chair. I simply opened one and replaced the chair object. I think they are for destruction animations and not required for sitting.
edit: I’ll make something more detailed. be back later.
Hopefully this helps:
I will also copy the words from the pictures here so you can run it through a translator.
- Export a base game chair (I use NWN Explorer)
-Models from the “Model” folder
-.PWK from the “Models, Walkmesh, Placeable” folder
- Open and Hide everything except the original chair object parts. and the Aurora Base
- Rename the chair file
- Import (or create) your chair object. (Example. a Fire Giant head)
- Link the new object (Fire Giant Head) to the same location as the original chair objects
- Resize the new object and align with the original chair seat TOP and FRONT edges (it does not matter how wide or long the object is, the TOP and FRONT must align so it does not cut the sitter’s legs)
- Delete the original chair object parts.
- Export the new model.
Normally, You should have 3 files for every object: Model, .PWK, Texture plus an edited placeables.2DA if you dont want to overwrite anything.
Add to HAK and check in game.
Without the .PWK, any sitter will face a single direction regardless of position.
With the .PWK, any sitter will face wherever the chair faces. In this case we used the default .PWK from the base chair
To edit the PWK see instructions above
OK, I’m trying to do everything you have written, but:
- the model of the standard chair is not imported by NWmax, here is the error.
OK, I ran the model through CleanModel to get rid of the error. That’s what I discovered.
As I understood (as I thought), the key elements for the “sitting” function is the dummy object “x02_pwk_use01”… Otherwise, the entire structure of names corresponds to my project. I created exactly the same dummy object for my project, made a link with another dummy AuroraPlaceable [pwk], but an error occurs when exporting, it may affect the final reult. CleanModel does not fix this model due to “a large number of errors”. As a result, the model opens in the game, but the character still sits facing East.
I will try to just" stupidly " replace the model of a standard chair with my own, rename the file and upload it to the game, without manipulating other objects…
There was no NWmax export error, but the result is the same… doesn’t work I just don’t know why?
I uploaded all the project files to the rar archive. Please see if I have problems with my 3dMax2010? Or NWmax 0.8. C00… Do I need to use NWmax Plus? What do you use?
I use Gmax so your 3dstudio is better than mine. I use the same NWmax
There was something wrong with your .PWK - I replaced it with mine.
It works now.
Your chair is beautiful.
If you make more chairs just copy and rename my .PWK
I saved it as a separate filename so you can compare.
You seem to have done everything correctly
Try to make another chair. If the problem returns it means your .PWK is being altered on export.
To fix, try (Only if the problem returns)
- Adding/Renaming my .PWK to your new chair, AFTER you are satisfied with the shape, so you do not have to open the .PWK file
- or maybe reinstall your NWNmax, I’m not sure about this though
Thanks! I’ll try your version, thank you for helping. I will try to replace my PWK with yours
You can use my chair in your projects, and anyone who wants to, I just don’t have time to upload my modifications to Vault.
Yeeeee! I’ve solved the problem! All the problems were in the name of the wolfmesh model and dummy object. The “use” function must have correct, standard names of model objects. The name for the wolfmesh model should be “PLC_X02_wg”, and the name of the dummy object “X02_pwk_use01”, the name of the parent dummy object for binding should be" PLC_X02_pwk", the other objects in the model can have their own names, see the model hierarchy in the screenshot. That’s how it works! The form of the wolfmesh can be any, for the “use” function, the main thing is the presence of any wolfmesh and dummy objects with" correct " names.
Thank you to all who responded, thanks to you, I figured out the problem, I think the theme will be useful for beginners!