Hi everybody. I'm trying to script a weapon system for a friend's project but first I need to figure out how they work.
You see, I downloaded and played the Nirhis demo (really cool, Juutis) and viewing the enemies' actors, I realized they don't have the weapons on them. So I tried to figure out how to change and set their weapons. I didn't find it in the manual, and in the scripts I only found SetWeapon(theweapon); But I can't figure out how to set the bone where to attach that weapon.
Please could you explain it to me?
Noobish question
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
- metal_head
- Posts: 1244
- Joined: Sat Jan 05, 2008 8:31 pm
- Location: Bulgaria,Sofia
- Contact:
Re: Noobish question
I think the weapon must have the same skeleton as the pawn.
Re: Noobish question
Yeah, both must have the same skeleton. You must assign the weapon's vertices to the skeleton (probably the hand bone) in the modeling software and then export it to RF. So basically you assign the weapon to a bone when modeling the weapon, not when it's already in RF.
Pain is only psychological.
- metal_head
- Posts: 1244
- Joined: Sat Jan 05, 2008 8:31 pm
- Location: Bulgaria,Sofia
- Contact:
Re: Noobish question
and than in the script make a variable with the weapon for example
WEAPON [pisol] (make sure that "pistol" pawn.ini)
and than SetWeapon(WEAPON);
Is that right,Juutis? You know I'm a beginner
EDIT: of course if that seems hard to you,you can always attatch the weapon's 3D model to the pawn's 3D model easily in Milkshape!
WEAPON [pisol] (make sure that "pistol" pawn.ini)
and than SetWeapon(WEAPON);
Is that right,Juutis? You know I'm a beginner
EDIT: of course if that seems hard to you,you can always attatch the weapon's 3D model to the pawn's 3D model easily in Milkshape!
Re: Noobish question
Yap, that's right. You could also write directly 'SetWeapon("pistol");' but using a variable is definitely better. It's much easier to do changes then, and overall it's much cleaner.metal_head wrote:and than in the script make a variable with the weapon for example
WEAPON [pisol] (make sure that "pistol" pawn.ini)
and than SetWeapon(WEAPON);
Is that right,Juutis? You know I'm a beginner
Pain is only psychological.
- metal_head
- Posts: 1244
- Joined: Sat Jan 05, 2008 8:31 pm
- Location: Bulgaria,Sofia
- Contact:
Re: Noobish question
yeah,that's why I make my pawn's weapons with variables.
BTW I don't remember..it was a lot time ago,but once I didn't use a variable for something (I don't remeber what) and the script gave an error,than when I used a variable,there were no problems...
BTW I don't remember..it was a lot time ago,but once I didn't use a variable for something (I don't remeber what) and the script gave an error,than when I used a variable,there were no problems...
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
Re: Noobish question
Ok, one question regarding this. If I wanted to use this, would I be able to make the assigned weapon do different animations? Say like I tell the pawn it's attached to, to do the Walk animation. Would the weapon play it's own Walk animation?
- metal_head
- Posts: 1244
- Joined: Sat Jan 05, 2008 8:31 pm
- Location: Bulgaria,Sofia
- Contact:
Re: Noobish question
if the weapon has the same skeleton as the [awn,it will execute the same animation as the pawn does.
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
Re: Noobish question
Awesome