LenaWolfBravil Posted April 6 Share Posted April 6 38 minutes ago, GamerRick said: 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. I think it would be a matter to try it out. OnAttack might be better. This would need to be tested in conjunction with the spell. Yes, OnRecoil and OnStagger would be better than a quest that runs every frame. But may be the mod you're using was made before OBSE had this event functionality. Or may be the mod author didn't know how to use it. Link to comment Share on other sites More sharing options...
RomanR Posted April 12 Share Posted April 12 After some research and tests I'm positive it can be done. For ranged spells you can use invisible activators positioned in front of you - first one will shoot spell of your choice, second will serve as a target in which direction the first one will shoot. For positioning you will need OBSE, as vanilla doesn't have needed functions. Also positioning them at right direction is quite tricky in first person, but for races scaled near 1 doable. However using activator will bring some small disadvantages: 1. By default this won't raise any skill, but it can be arranged using OBSE function. 2. Doesn't trigger a crime when hitting friendly NPC (if you care of course). 3. Friendly fire (you can be hit by your "own" spell if not carefull). 4. On my computer projectile from activator doesn't light surrounding enviroment for some reason (but as I named my test power Mind Projectile, it's propably fitting). I can upload my test mod, if there's still interest, but bear in mind it's largely experimental - reasonably tested though. Link to comment Share on other sites More sharing options...
JoachimLaw Posted May 6 Author Share Posted May 6 On 4/13/2024 at 2:19 AM, RomanR said: After some research and tests I'm positive it can be done. For ranged spells you can use invisible activators positioned in front of you - first one will shoot spell of your choice, second will serve as a target in which direction the first one will shoot. For positioning you will need OBSE, as vanilla doesn't have needed functions. Also positioning them at right direction is quite tricky in first person, but for races scaled near 1 doable. However using activator will bring some small disadvantages: 1. By default this won't raise any skill, but it can be arranged using OBSE function. 2. Doesn't trigger a crime when hitting friendly NPC (if you care of course). 3. Friendly fire (you can be hit by your "own" spell if not carefull). 4. On my computer projectile from activator doesn't light surrounding enviroment for some reason (but as I named my test power Mind Projectile, it's propably fitting). I can upload my test mod, if there's still interest, but bear in mind it's largely experimental - reasonably tested though. i think i know what type of invisible activator you were talking about, from Supreme Magicka perhaps? i researched its Mystic Hands spell but as soon as i know how it's done i didn't want to "copy" the effects anymore. it's too complicated for me to do a version of my own and i'd like to keep Finger of the Mountain in the spell slot while i'm waving fancy sword waves. but anyway thanks for advising. Link to comment Share on other sites More sharing options...
JoachimLaw Posted May 6 Author Share Posted May 6 (edited) thanks people, i'd appreciate you all for posting in my first post. there is only one but rather weird problem that i posted before, i DID install OBSE and any mods that require it and my game didn't crash, but the game won't run my script for that special weapon, specificly, OnAttack function and such doesn't work. anyway, you'll always welcome to give any advices here. Edited May 6 by JoachimLaw Link to comment Share on other sites More sharing options...
RomanR Posted May 6 Share Posted May 6 OnAttack and OnRelease aren't functions, they're events defined by SetEventHandler command. By using it you specify type of event you want and a script which will handle it. However script functions made as event handlers aren't made to return values, so if you need such thing (and you propably will), use shared quest or global variable. You must also define SetEventHandler events again at every restart of Oblivion. Handler function can be like this: scn FnMyOnReleaseHandler ref actor ref weapon begin function {actor} if actor == PlayerRef ;It was player... let weapon := actor.GetEquippedObject 16 if weapon == MyMagicWeapon ;...who done swing with wanted weapon? if MyQuest.canCast == 0 set MyQuest.canCast to 1 ;inform another part via this quest flag endif endif endif end Link to comment Share on other sites More sharing options...
JoachimLaw Posted May 13 Author Share Posted May 13 On 5/7/2024 at 4:10 AM, RomanR said: OnAttack and OnRelease aren't functions, they're events defined by SetEventHandler command. By using it you specify type of event you want and a script which will handle it. However script functions made as event handlers aren't made to return values, so if you need such thing (and you propably will), use shared quest or global variable. You must also define SetEventHandler events again at every restart of Oblivion. Handler function can be like this: scn FnMyOnReleaseHandler ref actor ref weapon begin function {actor} if actor == PlayerRef ;It was player... let weapon := actor.GetEquippedObject 16 if weapon == MyMagicWeapon ;...who done swing with wanted weapon? if MyQuest.canCast == 0 set MyQuest.canCast to 1 ;inform another part via this quest flag endif endif endif end no wonder i can't make it works, much appreciate it, thanks for the example!! Link to comment Share on other sites More sharing options...
Recommended Posts