Please help, cant switch weapon to other hand.
-
- Posts: 3
- Joined: Thu Sep 19, 2013 12:13 am
Please help, cant switch weapon to other hand.
Everytime i try to switch weapons with the B key my charsctor does a cool little spin instead of switching my weapon to the other hand, does anyone know how to fix this?
Re: Please help, cant switch weapon to other hand.
Download the a200 scripts, copy the section that defines what happens when you press B in the aschar.as file and paste it into the corresponding section of this version's aschar.as.TheEldritchShark wrote:Everytime i try to switch weapons with the B key my charsctor does a cool little spin instead of switching my weapon to the other hand, does anyone know how to fix this?
They have changed the command in this version, probably to test something out. The old script command still works, though.
I'll post the section you have to copy and paste in a jiffy. Just have to find it.
So hang tight!
Here is the section in a201's aschar.as file that teels your character to spin once you hit B. It starts in line 1265:
Code: Select all
if(GetInputPressed(this_mo.controller_id, "b")){
int8 flags = _ANM_FROM_START;
if(mirrored_stance){
flags = flags | _ANM_MIRRORED;
}
flags = flags | _ANM_MOBILE;
//mirrored_stance = !mirrored_stance;
this_mo.SetAnimation("Data/Animations/r_hitspinright.anm",20.0f,flags);
this_mo.rigged_object().anim_client().SetAnimatedItemID(0, weapon_slots[primary_weapon_slot]);
in_animation = true;
//throw_anim = true;
this_mo.rigged_object().anim_client().SetAnimationCallback("void EndAnim()");
//this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_knifethrowlayer.anm",8.0f,0);
//this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_painflinch.anm",8.0f,0);
/*if(sheathed_weapon == -1 && held_weapon != -1) {
//this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_knifesheathe.anm",8.0f,0);
this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_swordsheathe.anm",8.0f,0);
} else if(sheathed_weapon != -1 && held_weapon == -1) {
this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_knifeunsheathe.anm",8.0f,0);
}*/
/*int8 flags = _ANM_FROM_START;
if(weapon_slots[primary_weapon_slot] != -1) {
this_mo.SetAnimation("Data/Animations/r_swordsheathe.anm",20.0f,flags);
this_mo.rigged_object().anim_client().SetAnimatedItemID(1, weapon_slots[_sheathed_right]);
} else if(weapon_slots[primary_weapon_slot] == -1) {
this_mo.SetAnimation("Data/Animations/r_swordunsheathe.anm",20.0f,flags);
this_mo.rigged_object().anim_client().SetAnimatedItemID(1, weapon_slots[_sheathed_right_sheathe]);
}
in_animation = true;
this_mo.rigged_object().anim_client().SetAnimationCallback("void EndAnim()");*/
//
//SwapWeaponHands();
//CheckPossibleAttacks();
}
Code: Select all
if(GetInputPressed(this_mo.controller_id, "b")){
/*int8 flags = _ANM_FROM_START;
if(mirrored_stance){
flags = flags | _ANM_MIRRORED;
}
this_mo.SetAnimation("Data/Animations/w_combatidlewild.anm",20.0f,flags);
in_animation = true;
this_mo.rigged_object().anim_client().SetAnimationCallback("void EndAnim()");*/
//this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_knifethrowlayer.anm",8.0f,0);
//this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_painflinch.anm",8.0f,0);
/*if(sheathed_weapon == -1 && held_weapon != -1) {
//this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_knifesheathe.anm",8.0f,0);
this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_swordsheathe.anm",8.0f,0);
} else if(sheathed_weapon != -1 && held_weapon == -1) {
this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_knifeunsheathe.anm",8.0f,0);
}*/
/*int8 flags = _ANM_FROM_START;
if(weapon_slots[primary_weapon_slot] != -1) {
this_mo.SetAnimation("Data/Animations/r_swordsheathe.anm",20.0f,flags);
this_mo.rigged_object().anim_client().SetAnimatedItemID(1, weapon_slots[_sheathed_right]);
} else if(weapon_slots[primary_weapon_slot] == -1) {
this_mo.SetAnimation("Data/Animations/r_swordunsheathe.anm",20.0f,flags);
this_mo.rigged_object().anim_client().SetAnimatedItemID(1, weapon_slots[_sheathed_right_sheathe]);
}
in_animation = true;
this_mo.rigged_object().anim_client().SetAnimationCallback("void EndAnim()");*/
SwapWeaponHands();
//CheckPossibleAttacks();
}
-
- Posts: 3
- Joined: Thu Sep 19, 2013 12:13 am
Re: Please help, cant switch weapon to other hand.
Thank you for the help :3
-
- Posts: 2
- Joined: Sat Sep 28, 2013 11:38 am
Re: Please help, cant switch weapon to other hand.
How do you open on mac?
-
- Posts: 3
- Joined: Sat Dec 21, 2013 6:14 am
Re: Please help, cant switch weapon to other hand.
It doesn't seem to work on 204, or maybe im just doing something wrong.
I replaced it the top with the bottom and on loading of a map it came up with 2 errors and crashed
Know any other ways to swap hand?
I replaced it the top with the bottom and on loading of a map it came up with 2 errors and crashed
Know any other ways to swap hand?
Re: Please help, cant switch weapon to other hand.
The only way to change control stuff is by changing the scripts. The problem is, scripts tend to change for every alpha. You copy-pasted something that was made for an older alpha, and that's why it didn't work. I don't have a computer with Overgrowth in it, at the moment, so I can't help you with fixing that bit of script for the newest alpha.
Were you able to fix it yet, or is your game still crashing?
Were you able to fix it yet, or is your game still crashing?
-
- Posts: 3
- Joined: Sat Dec 21, 2013 6:14 am
Re: Please help, cant switch weapon to other hand.
I made a copy of the default scripts, its not crashing anymore, but i still can't use swap hands.Endoperez wrote:The only way to change control stuff is by changing the scripts. The problem is, scripts tend to change for every alpha. You copy-pasted something that was made for an older alpha, and that's why it didn't work. I don't have a computer with Overgrowth in it, at the moment, so I can't help you with fixing that bit of script for the newest alpha.
Were you able to fix it yet, or is your game still crashing?
Re: Please help, cant switch weapon to other hand.
Actually there are only few lines that are important for switching weapon hand.DemonicTortoise wrote:I made a copy of the default scripts, its not crashing anymore, but i still can't use swap hands.Endoperez wrote:The only way to change control stuff is by changing the scripts. The problem is, scripts tend to change for every alpha. You copy-pasted something that was made for an older alpha, and that's why it didn't work. I don't have a computer with Overgrowth in it, at the moment, so I can't help you with fixing that bit of script for the newest alpha.
Were you able to fix it yet, or is your game still crashing?
So you need to replace
Code: Select all
int8 flags = _ANM_FROM_START;
if(mirrored_stance){
flags = flags | _ANM_MIRRORED;
}
flags = flags | _ANM_MOBILE;
//mirrored_stance = !mirrored_stance;
this_mo.SetAnimation("Data/Animations/r_hitspinright.anm",20.0f,flags);
this_mo.rigged_object().anim_client().SetAnimatedItemID(0, weapon_slots[primary_weapon_slot]);
in_animation = true;
//throw_anim = true;
this_mo.rigged_object().anim_client().SetAnimationCallback("void EndAnim()");
//this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_knifethrowlayer.anm",8.0f,0);
//this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_painflinch.anm",8.0f,0);
/*if(sheathed_weapon == -1 && held_weapon != -1) {
//this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_knifesheathe.anm",8.0f,0);
this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_swordsheathe.anm",8.0f,0);
} else if(sheathed_weapon != -1 && held_weapon == -1) {
this_mo.rigged_object().anim_client().AddLayer("Data/Animations/r_knifeunsheathe.anm",8.0f,0);
}*/
/*int8 flags = _ANM_FROM_START;
if(weapon_slots[primary_weapon_slot] != -1) {
this_mo.SetAnimation("Data/Animations/r_swordsheathe.anm",20.0f,flags);
this_mo.rigged_object().anim_client().SetAnimatedItemID(1, weapon_slots[_sheathed_right]);
} else if(weapon_slots[primary_weapon_slot] == -1) {
this_mo.SetAnimation("Data/Animations/r_swordunsheathe.anm",20.0f,flags);
this_mo.rigged_object().anim_client().SetAnimatedItemID(1, weapon_slots[_sheathed_right_sheathe]);
}
in_animation = true;
this_mo.rigged_object().anim_client().SetAnimationCallback("void EndAnim()");*/
//
//SwapWeaponHands();
//CheckPossibleAttacks();
Code: Select all
SwapWeaponHands();
So here is the whole function using b key to switch hands.
Code: Select all
if(GetInputPressed(this_mo.controller_id, "b")){
SwapWeaponHands();
}
-
- Posts: 3
- Joined: Sat Dec 21, 2013 6:14 am
Re: Please help, cant switch weapon to other hand.
It worked.
Thank you
Thank you
-
- Posts: 1
- Joined: Sat Aug 31, 2013 12:22 pm
Re: Please help, cant switch weapon to other hand.
If anyone reading this is unsure make sure to check out this video:
http://www.youtube.com/watch?v=WccZYk1f ... e=youtu.be
http://www.youtube.com/watch?v=WccZYk1f ... e=youtu.be
Re: Please help, cant switch weapon to other hand.
I'm not sure if it was because I changed the script to do this, but I now cant seem to be able to sheathe, switch or drop weapons. Is anyone else also having this problem?
Re: Please help, cant switch weapon to other hand.
use text editWaffle Waffleton wrote:How do you open on mac?
-
- Posts: 6
- Joined: Mon Jan 27, 2014 8:55 am
Re: Please help, cant switch weapon to other hand.
I always do this. If there are two weapons I pick one up then sheathe it then pick the other one up and then if I sheathe that one I can pull that one out then drop it then pull out the first one and its still in the right hand (I don't know if that helps or not)DemonicTortoise wrote:It doesn't seem to work on 204, or maybe im just doing something wrong.
I replaced it the top with the bottom and on loading of a map it came up with 2 errors and crashed
Know any other ways to swap hand?
Re: Please help, cant switch weapon to other hand.
in the latest version if you want to swap hands without your character automatically switching back the frame afterwards, you'll also want to ctrl+f SwapWeaponHands(); to find this piece of code in the aschar.as;
which can easily be commented out by putting a /* before the first 'if' and a */ after the last curly brace, OR by putting a pair of slashes in front of each one of those lines (ie, //).
otherwise, you'll only be able to swap hands if you're holding an item in each hand - which makes it impossible to unsheathe more than one weapon or unsheathe anything with something already in your main hand.
items in the offhand don't seem to have any effect though, which is probably why handswapping was commented out in the first place.
Code: Select all
if(weapon_slots[primary_weapon_slot] == -1 && weapon_slots[secondary_weapon_slot] != -1){
SwapWeaponHands();
}
otherwise, you'll only be able to swap hands if you're holding an item in each hand - which makes it impossible to unsheathe more than one weapon or unsheathe anything with something already in your main hand.
items in the offhand don't seem to have any effect though, which is probably why handswapping was commented out in the first place.
Re: Please help, cant switch weapon to other hand.
i love the spin and i totally loved it when you pressed b multiple times and it start dancing and stuff