Hi all, I'm making a wild west themed RPG and trying to put together the basic scripts for making my guns work, and I'm hitting a wall at every turn.
Because the attack stat is tied so deeply to other systems, I decided to use the "weapon" slot for melee tools and make guns technically "armor". Once you equip a gun, it adds the "Fire [weapon-name]" skill to your character - so far so good.
But I would like to make some guns single-action, meaning the hammer must be re-cocked between shots, so the original idea was to create a state called "cocking" which takes away your next turn and displays "X cocks the hammer"....HOWEVER, because of the way skills work, the state gets added to the TARGET instead of the USER.
If you change the scope to 'user', the damage will go to the user instead of the target, meaning I'd have to figure out a new way to calculate the damage as the target could no longer be chosen in the traditional way.
A common event seems the way to fix all of this, but I can't figure out how to make said event tag the right actor. It can check to see if you HAVE a skill, but it can't check to see if you're USING the skill. So - if two people have the same gun - it'll set them both to cock the hammer.
Basically, I'm trying to figure out how to get a skill to reference both the user AND the target with different effects - damage to the target, cocking to the user. How do you do this?
And - for a bonus - I've already given up trying to figure out how to make an ammo counter work. I can get it to count ammo correctly....unless you hand your weapon from one party member to the other, in which case the gun either fills or empties according to its default setup. I've gone to just destroying bullet items from the shared inventory.....but it's kind of cartoony.
Thanks in advance. Me = noob.
Because the attack stat is tied so deeply to other systems, I decided to use the "weapon" slot for melee tools and make guns technically "armor". Once you equip a gun, it adds the "Fire [weapon-name]" skill to your character - so far so good.
But I would like to make some guns single-action, meaning the hammer must be re-cocked between shots, so the original idea was to create a state called "cocking" which takes away your next turn and displays "X cocks the hammer"....HOWEVER, because of the way skills work, the state gets added to the TARGET instead of the USER.
If you change the scope to 'user', the damage will go to the user instead of the target, meaning I'd have to figure out a new way to calculate the damage as the target could no longer be chosen in the traditional way.
A common event seems the way to fix all of this, but I can't figure out how to make said event tag the right actor. It can check to see if you HAVE a skill, but it can't check to see if you're USING the skill. So - if two people have the same gun - it'll set them both to cock the hammer.
Basically, I'm trying to figure out how to get a skill to reference both the user AND the target with different effects - damage to the target, cocking to the user. How do you do this?
And - for a bonus - I've already given up trying to figure out how to make an ammo counter work. I can get it to count ammo correctly....unless you hand your weapon from one party member to the other, in which case the gun either fills or empties according to its default setup. I've gone to just destroying bullet items from the shared inventory.....but it's kind of cartoony.
Thanks in advance. Me = noob.