Difference between revisions of "User talk:Rookwood"
no edit summary
imported>Rookwood m |
imported>DragoonWraith |
||
Line 26: | Line 26: | ||
:I can't work out how to use the function GetMouseButtonPress I want it so that when I attack (click the left mouse button) it adds an animation token also I can't work out how to use ToggleSpecialAnim Here is my script | :I can't work out how to use the function GetMouseButtonPress I want it so that when I attack (click the left mouse button) it adds an animation token also I can't work out how to use ToggleSpecialAnim Here is my script | ||
scn PointyStickAnim | scn PointyStickAnim | ||
Begin OnActorEquip AESPointyStick | |||
player.ToggleSpecialAnim onehandattackright.kf | |||
if GetMouseButtonPress == 1 | |||
player.additem pointystickanimationtoken 1 | |||
else | |||
player.removeitem pointystickanimationtoken 1 | |||
Endif | |||
Endif | |||
End | |||
:Alex 16:53, 24 January 2010 (EST) | |||
::First, please do not e-mail members demanding attention to your questions; that's very rude. I check here when I can, and if I haven't checked, then it is because I am busy, or, perhaps, do not have an answer to your question. | |||
player.ToggleSpecialAnim | ::Anyway, if you want to do scripting, you're going to have to learn how to script properly. That means doing the [[My Second Script]] tutorial, and reading the various pages here and learning. For example, you have mis-matched if/else/elseif/endif statements in that script, so it probably doesn't even work. Second, OnActorEquip only works if the script is attached to the actor in question - assuming that you want this to work with the player, you can't do that, attaching a script to a player is a '''huge''' compatibility problem, assuming it even works (and I'm not sure it does). You should attach the script to the item, you should use [[GameMode]] and [[GetIsEquipped]], and then you should use ToggleSpecialAnim (which, by the way, needs you to pass a 1 after the filename to turn it on). Also, why are you adding the token at all? If the special anim works correctly, then it should replace the normal attack animation entirely - you shouldn't even have to detect button presses, it should ''just work''. Though, IIRC, it ''doesn't'', because special attack animations have problems (though I could very well be wrong on this point). | ||
::If that's the case, this becomes ''far'' more complicated, because you need to play an Idle animation and do your own attack detection and hit detection. That's exceedingly difficult to do, and very much not something anyone is just going to be able to "tell you" how to do - that's a very advanced script, and something that you will largely have to be able to understand, write, and debug yourself. | |||
::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 17:27, 27 January 2010 (EST) | |||
: |