NighTragEl4d Posted May 30, 2011 Share Posted May 30, 2011 Hi all,im working on a script that adds maximum attack speed (like enchantment for a weapon or as a ability) but with maximum 5 hits,then the weapon weight/speed returns to normal after 5 hits,and chance for that is like 5% or 2 %.So can you help? Link to comment Share on other sites More sharing options...
GreatLucifer Posted May 30, 2011 Share Posted May 30, 2011 (edited) How you'd want it to kick in, I'm not sure. Only condition I can think of is IsRunning, but ok. What you mean with the percentages I'm not sure either. But it sounds like you need a weaponexchange-script, with an added counter and conditions. A weaponexchange-script you can find here; http://www.tesnexus.com/downloads/file.php?id=34780 For the rest you'll have to be clearer about whatit is you exactly want... Hope this helps. Edited May 30, 2011 by GreatLucifer Link to comment Share on other sites More sharing options...
fg109 Posted May 30, 2011 Share Posted May 30, 2011 (edited) I think the attack speed is only controlled through animations... So if you want to change the attack speed, you'll have to change the attack animations. I don't know of any script commands to change the animations. If there is a way, then the rest is easy. EDIT: Well I looked some more and I guess I was wrong. Weapons have the property "Speed" which determines their attack speed, and this can be modified through OBSE commands. You need to have a quest with this script: scn questscript short counter short initialize float fquestdelaytime float tempfloat Begin GameMode if (fquestdelaytime != 0.5) set fquestdelaytime to 0.5 endif if (counter == 5 && initialize == 0) set initialize to 1 set tempfloat to weapon.GetWeaponSpeed set tempfloat to (2 * tempfloat) weapon.SetWeaponSpeed tempfloat elseif (counter == 0 && initialize == 1) set initialize to 0 set tempfloat to weapon.GetWeaponSpeed set tempfloat to (0.5 * tempfloat) weapon.SetWeaponSpeed tempfloat endif End And you need to put an enchantment on the weapon with this script: scn spellscript short tempshort Begin ScriptEffectStart if (quest.counter == 0) set tempshort to GetRandomPercent if (tempshort < 6) set quest.counter to 5 endif else set quest.counter to (quest.counter - 1) endif End What should happen is that every time you hit something with the weapon, there's a 5% chance of doubling your attack speed for your next 5 hits. Edited May 30, 2011 by fg109 Link to comment Share on other sites More sharing options...
NighTragEl4d Posted May 30, 2011 Author Share Posted May 30, 2011 (edited) I think the last comment is what im looking for,ty ill try it out. EDIT: CS is reporting unknown fuction "counter" im running it with OBSE any suggestions? Edited May 30, 2011 by NighTragEl4d Link to comment Share on other sites More sharing options...
Aria C Posted May 30, 2011 Share Posted May 30, 2011 (edited) I have not tried this but couldnt you also edit the weapons base attack speed in the CS without the use of scripts. then use enchantments to slow down and speed it up? Edited May 30, 2011 by Aria C Link to comment Share on other sites More sharing options...
NighTragEl4d Posted May 30, 2011 Author Share Posted May 30, 2011 (edited) Apparently it can,but i didnt test this yet bcuz last script that fg109 gave me reports unkown variable "counter" :S. I can try that too but the thing is im modifing the CoH werewolf claws :S,there are already few weapons for each alignement of a werewolf so it could cause bugs i prefer to script xD. Edited May 30, 2011 by NighTragEl4d Link to comment Share on other sites More sharing options...
fg109 Posted May 30, 2011 Share Posted May 30, 2011 You must compile the quest script first, then attach it to a quest, before compiling the spell script. Also, "quest" is quest ID and "weapon" is the weapon reference ID. Link to comment Share on other sites More sharing options...
NighTragEl4d Posted May 30, 2011 Author Share Posted May 30, 2011 Y my friend told me that already ty for help =). Link to comment Share on other sites More sharing options...
Recommended Posts