Attaching Weapon to Character (RPG mode)

Learn more on how to use Sandbox, or submit your own tutorials or resources.
User avatar
Wind Astella
Member
Member
Posts: 112
Joined: June 4th, 2013, 6:18 am
Name: Nik Mirza
IRC Username: windastella
Contact:

Attaching Weapon to Character (RPG mode)

Postby Wind Astella » April 16th, 2014, 9:49 am

As requested by Defunctul. There is a lack of tutorial on this matter.Some may have realized that RC model do have tag but it is attach at odd place. I already knew how to do this for a while already and I should share it to everyone.

So here is a tutorial on how to attach weapon to character.
http://windastellaworld.blogspot.ru/201 ... -mode.html

Tell me if it need some improvement.

Defunctul
Member
Member
Posts: 15
Joined: April 11th, 2013, 7:26 am
Name: Nick

Re: Attaching Weapon to Character (RPG mode)

Postby Defunctul » April 16th, 2014, 10:35 am

Brilliant! Simply brilliant! :D Ty so much for taking your time to write this, I already learned alot (being a total noob at scripting and other engine stuff, I am only a 3d artist). I'm pretty sure this will help a LOT of ppl.

Btw if I am getting this right, I see that you attach the weapon model to the actual 'item'. So this means that the model will visually appear when you EQUIP the item in your character panel right? Sry if that sounds noobish just wanted to clear it out :mrgreen:

All in all, I bow to the simple and straight to the point tutorials you make for us newbs :D

User avatar
Wind Astella
Member
Member
Posts: 112
Joined: June 4th, 2013, 6:18 am
Name: Nik Mirza
IRC Username: windastella
Contact:

Re: Attaching Weapon to Character (RPG mode)

Postby Wind Astella » April 16th, 2014, 10:59 am

Yes, that is how the system work in the RPG mode. The model change as the item change.

You can attach it right to the model but of course it won't change if you switch weapon. That is what I like about the RPG mode that you can switch model with script.

Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Attaching Weapon to Character (RPG mode)

Postby Hirato » April 17th, 2014, 8:51 am

That's not a very efficient way.


First of all, you can use clearmodel to clear a model's config files, so it is reevaluated on the next frame. ie /clearmodel vweps/mywep
You can use commands like mdltrans and mdlrotate to adjust it until it's just right; just use the above command.

You can also do likewise with the character model itself; you don't need to go to the effort to add specific 'tag bones' either.
The full form of the iqmtag command is: iqmtag bone name tx ty tx rx ry rz
tx/ty/tz are translations, and the rx/ry/rz are rotations; you can tweak these till you get it just right if the issue's in the character rather than the attachments.
This is not a url, clicking it is pointless

User avatar
Wind Astella
Member
Member
Posts: 112
Joined: June 4th, 2013, 6:18 am
Name: Nik Mirza
IRC Username: windastella
Contact:

Re: Attaching Weapon to Character (RPG mode)

Postby Wind Astella » April 17th, 2014, 9:12 am

I do know it is possible. I just do it in my own way. I'm a modeler so I think of it on the model package side rather than the engine side.
Thank you very much for the information Hirato. Maybe I'll make another version of this tutorial base on your suggestion.


Return to “Tutorials and Resources”

Who is online

Users browsing this forum: No registered users and 3 guests