JoachimLaw Posted April 5 Share Posted April 5 it's NOT a staff, NOR a bow, just a melee weapon that swings around. AND players don't need to cast any spells first. works just a normal enchanted weapon but it will shoots a fireball as i swing it. can it be done? Link to comment Share on other sites More sharing options...
LenaWolfBravil Posted April 5 Share Posted April 5 (edited) Yes. Use OnHitWith or OnRelease event handler. However, how would it be different from a normal enchanted sword? Edited April 5 by LenaWolfBravil Link to comment Share on other sites More sharing options...
JoachimLaw Posted April 5 Author Share Posted April 5 (edited) 1 hour ago, LenaWolfBravil said: Yes. Use OnHitWith or OnRelease event handler. However, how would it be different from a normal enchanted sword? eh maybe i didn't make it clear, i mean just swing around whether i hit something or not the weapon will still shoot a fireball. like the Getsuga Tensho. btw i've tried to use CSE but i couldn't get to use any OBSE handler such as onattack, what did i do wrong? Edited April 5 by JoachimLaw Link to comment Share on other sites More sharing options...
LenaWolfBravil Posted April 5 Share Posted April 5 1 hour ago, JoachimLaw said: eh maybe i didn't make it clear, i mean just swing around whether i hit something or not the weapon will still shoot a fireball. like the Getsuga Tensho. btw i've tried to use CSE but i couldn't get to use any OBSE handler such as onattack, what did i do wrong? I don't know Getsuga Tensho. Please explain what would be the purpose of such a fireball? What is its target? You have to program your own event handlers. You don't need the CSE either, just OBSE (but of course I'd recommend CSE anyway). See Oblivion CS Wiki - search for SetEventHandler. Link to comment Share on other sites More sharing options...
JoachimLaw Posted April 5 Author Share Posted April 5 1 hour ago, LenaWolfBravil said: I don't know Getsuga Tensho. Please explain what would be the purpose of such a fireball? What is its target? You have to program your own event handlers. You don't need the CSE either, just OBSE (but of course I'd recommend CSE anyway). See Oblivion CS Wiki - search for SetEventHandler. well, Getsuga Tensho is a major skill in Bleach, when using it, a sword wave will come out from the slash to cut the target in a distance. in this case, it's a type of sword (or any melee weapons) like a staff in Oblivion, when i attack, it will shoot out a projectile to do a long-range attack or just for beauty and fun, i want to create one of it to do some RP things. and then about OBSE, i haven't learnt to how to use it yet, still, i insist to use CSE for its convenience, but i think i'll try to learn it maybe someday if you say so. since CSE keeps telling me that it's an invalid block type and blablabla and i just can't save the script. WHY? isn't it the CSE? didn't it use OBSE already? Link to comment Share on other sites More sharing options...
LenaWolfBravil Posted April 5 Share Posted April 5 Yes, the CSE already uses OBSE, so you're all set. An event handler does not work with blocks. OnRelease is an event, not a block type. What you need to do is write an event handler for the event "OnRelease", set it with SetEventHandler and process the event. You can script it to cast a spell from an activator when this event occurs. Do not cast the spell from the player, or the player will do the casting animation. Instead you need to move the activator to the player and cast the spell from that. Event processing is OBSE functionality. It is not possible to do it in vanilla. It is quite advanced stuff. However, there are example scripts in the CS Wiki for most of this. Link to comment Share on other sites More sharing options...
JoachimLaw Posted April 6 Author Share Posted April 6 7 hours ago, LenaWolfBravil said: Yes, the CSE already uses OBSE, so you're all set. An event handler does not work with blocks. OnRelease is an event, not a block type. What you need to do is write an event handler for the event "OnRelease", set it with SetEventHandler and process the event. You can script it to cast a spell from an activator when this event occurs. Do not cast the spell from the player, or the player will do the casting animation. Instead you need to move the activator to the player and cast the spell from that. Event processing is OBSE functionality. It is not possible to do it in vanilla. It is quite advanced stuff. However, there are example scripts in the CS Wiki for most of this. thank you for your answering and patience, bless you. Link to comment Share on other sites More sharing options...
GamerRick Posted April 6 Share Posted April 6 (edited) For detecting when the player is just swinging the sword, all I can think of is something I saw in the mod No Recoil or Stagger. A quest script that runs every frame, with this command in a GameMode block: if Player.IsAnimGroupPlaying recoil ; Is there an anim for swinging a sword? If so, it would require a bit more to get it to work right, but it's a place to start maybe. Edited April 6 by GamerRick Link to comment Share on other sites More sharing options...
LenaWolfBravil Posted April 6 Share Posted April 6 40 minutes ago, GamerRick said: For detecting when the player is just swinging the sword, all I can think of is something I saw in the mod No Recoil or Stagger. A quest script that runs every frame, with this command in a GameMode block: if Player.IsAnimGroupPlaying recoil ; Is there an anim for swinging a sword? If so, it would require a bit more to get it to work right, but it's a place to start maybe. Quests that run every frame are to be avoided though. This is exactly what OnRelease event marks. It works for any weapon, not just the bow. Relying on animations for melee attacks is tricky because there are at least two different ones - regular attack versus power attack. Link to comment Share on other sites More sharing options...
GamerRick Posted April 6 Share Posted April 6 (edited) 4 hours ago, LenaWolfBravil said: Quests that run every frame are to be avoided though. This is exactly what OnRelease event marks. It works for any weapon, not just the bow. Relying on animations for melee attacks is tricky because there are at least two different ones - regular attack versus power attack. OnRelease, eh. Sounds good. OnAttack looks like it would be good for what the OP is asking for. I wonder if OnRecoil and OnStagger would be better than what the mod I am using does. Edited April 6 by GamerRick Link to comment Share on other sites More sharing options...
Recommended Posts