Jump to content

Scripting Help Request


Recommended Posts

I need help with two scripts for weapons. First:



I'm trying to create a weapon for a large mod I'm working on that has a one in ten chance of instantly killing the target when it strikes. I have no idea how to script things beyond the most basic modification of existing scripts.



The basic idea is that this will be an extremely difficult sword to acquire, but can absolutely destroy enemies - think the Gisarme in Shining Force 2, which is its direct inspiration.



If possible, I'd like to include a text message that displays when the instakill is triggered, but if that's impossible/too difficult to work in, it's not strictly necessary.



Any help would be appreciated, and a functioning script would be amazing.



And second:



I need some help with a script on a weapon. What I'd like to do is set it up so that when said weapon (let's say Weapon_A) is equipped, the player can press a button and Weapon_A will be removed from the player's inventory and another specific weapon that the player does not own (hereafter, Weapon_B) will be added and equipped on the player. Subsequently, Weapon_B will have a similar script where pressing the button will remove Weapon_B and add and equip Weapon_A on the player.



The idea that I'm going for here is that the player can 'toggle' one of the enchantments on the weapon, with the press of the button, the weapon switching out will make it look like the enchantment is simply turning on and off - in this case, it will be Soultrap - Weapon_A and Weapon_B will be identical except that Weapon_B will have a Soultrap effect added to its existing enchantments.



I was also thinking about expanding this to three weapons, to allow the player to toggle between a weapon that deals fire, ice, and shock damage.



I'm not worried about the weapon repairing itself and recovering lost enchantment points when it switches.



I've seen something similar done before in another mod (I believe it was Sea of Destiny), where a khopesh was able to switch orientation from inner curve to outer curve by holding the crouch button, so I know something like this is possible.



I'm almost completely inept when it comes to scripting, so a very clear, straightforward explanation would be appreciated, and the script completely written out would be adored.



If anyone can help/provide a functioning script for either of these, I would be very grateful. I'd like to add both of these into the mod I'm working on, but the first is definitely more important to me.



Thanks in advance!


Link to comment
Share on other sites

  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...