Jump to content

Little scripting help


NighTragEl4d

Recommended Posts

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

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 by GreatLucifer
Link to comment
Share on other sites

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 by fg109
Link to comment
Share on other sites

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 by NighTragEl4d
Link to comment
Share on other sites

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 by Aria C
Link to comment
Share on other sites

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 by NighTragEl4d
Link to comment
Share on other sites

  • Recently Browsing   0 members

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