Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Increasing weapon speed


Zabre
 Share

Recommended Posts

Is it possible to increase the weapon speed of an item the more times you swing the sword? For instance, I attack XXX target and the weapon speed of weapon XXX increases by .2. After 10 seconds of not using weapon XXX, the weapon speed resets.

First time even using the CS for about 4 months. I forgot almost all my script knowledge. >_<

Link to comment
Share on other sites

I can't seem to run the script when the weapon is swung. If only there was a OnAttackWith thing. Anyone know a way to mimic that?

scn 333RagebladeScript


ref weapon

float weaponspeed

float increase


begin OnHitWith 333RageW

	set weapon to player.getequippedobject 16

	set weaponspeed to getweaponspeed weapon

	set increase to weaponspeed + .2

	setweaponspeed increase weapon

end

	

I can't get the block to start correctly. I thought OnHitWith meant whenever someone is hit with the weapon... But that's not the case. :|

Edited by Zabre
Link to comment
Share on other sites

What you really need is a quest script, it works simialr to most other scripts except you attach it to a dummy quest XD

This is a rough idea of what you need

Float fQuestDelayTime
Ref rTarget

Begin GameMode
let rTarget := GetCrosshairRef
let fQuestDelayTime := 0.1

If (OnControlDown 4) ;Attack Key
If (Player.IsAttacking == 1)
;Check to see if target is valid
; If valid do your stuff
Endif
Endif
End[/code]

Link to comment
Share on other sites

What you really need is a quest script, it works simialr to most other scripts except you attach it to a dummy quest XD

This is a rough idea of what you need

Float fQuestDelayTime

Ref rTarget


Begin GameMode

	let rTarget := GetCrosshairRef

	let fQuestDelayTime := 0.1


	If (OnControlDown  4)	 ;Attack Key

		If (Player.IsAttacking == 1)

		     ;Check to see if target is valid

		         ; If valid do your stuff

		Endif

	Endif

End

Open to trying the code, but I have no idea how to make a "dummy quest" or how to start it and all that.

Link to comment
Share on other sites

Open the CS with OBSE, copy/paste/type that code above in, make all your changes and save as a quest script (Change the script type at the top). Then click the big "Q" icon along the top to open the quest screen, with it open right click the editor list and select "New", give the quest an ID. After that make sure you quest is selected and then on the right you'll see a script drop down box, select your script there.

For the check if there is a balid target first make sure there is a target there (value >0), if there is check to see if it's an NPC or Creature. That way the script will only run when you're targeting them and not any old object in the game XD

Link to comment
Share on other sites

This is so far what i've come up with.

-SNIP-

I actually borrowed help from some friends that are majoring in Software Engineering. They take a lot of coding stuff so it was easy for them. This is the WORKING increasing attack speed script. There is currently no reset, and the increase will go all the way to the Hard-coded cap.

scn 333RagebladeQuestScript


Float fQuestDelayTime

Ref rTarget

Ref weapon

Float weaponspeed

Float Increase


Begin GameMode

	let rTarget := GetCrosshairRef

	let fQuestDelayTime := 0.1


	If (OnControlDown  4)    ;Attack Key

		If (Player.IsAttacking == 1 && rTarget.isActor == 1)

			set weapon to player.GetEquippedObject 16

			set weaponspeed to player.getweaponspeed 333RageW

			set Increase to (weaponspeed + .2)

			setweaponspeed increase 333RageW

		endif	

	Endif

End

Edited by Zabre
Link to comment
Share on other sites

You will need to store base weapon speed somewhere, if you want to be able to reset back to it. If you want the increase to be permanent, you should implement some flavor of counter, and require X number of uses before incrementing weapon speed.

Maybe have the weapon slow down over time, if you aren't using it? :D

Link to comment
Share on other sites

You will need to store base weapon speed somewhere, if you want to be able to reset back to it. If you want the increase to be permanent, you should implement some flavor of counter, and require X number of uses before incrementing weapon speed.

Maybe have the weapon slow down over time, if you aren't using it? :D

I was actually thinking about counters last night I thought up "Something this fast wouldn't be that accurate." So I'm thinking of having it reset the attack speed should you stop looking at an actor. So you basically have to be accurate or you lose your speed. :)

Link to comment
Share on other sites

You could always have weapon speed increase be dependent on governing skill/style for the weapon...... the longer you use the same weapon, the better you get with it, conversely, if you use a weapon you are NOT familiar with, you are not as quick with it?

Sounds like a feature you would see in a combat overhaul :lol: Great ideas, You :P

I've actually put this script on the backburners. Been busy with my English classes. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...