Jump to content

Script explosion at projectile end point


ZippyDSMlee

Recommended Posts

So in NV I could easily put a palceatme whatever call with little else in a script and it would call up the explosion right where it should be. But I can not find any sane way to do it in Skyrim. So if I need a few explosions by script to go off at the end point of a projectile what spawn of Cthulhu process do I need to use?

 

 

I need to a few random enchantments to go off by themselves(from different magic effects) at the explosion location not at the cross hair or target or none of that BS.  

So as far as I can see the only wat to do it is spawn an activator and have the palceatme explosion target the activator,dose that sound about right?

Link to comment
Share on other sites

It is possible to attach scripts to explosions using TES5Edit.

This was done in the past for TREE records by request, and despite no interface for scripts when editing trees in CK, it doesn't remove already attached scripts and they work in game normally.

I tested attaching VMAD to EXPL and CK also doesn't strip it when saving a plugin, so I'm sure they will work in game too.

Link to comment
Share on other sites

It is possible to attach scripts to explosions using TES5Edit.

This was done in the past for TREE records by request, and despite no interface for scripts when editing trees in CK, it doesn't remove already attached scripts and they work in game normally.

I tested attaching VMAD to EXPL and CK also doesn't strip it when saving a plugin, so I'm sure they will work in game too.

 

Well my main problem right now is the script will not fire off unless the projectile hits or lands near an actor and I do not get why there is not a dynamic heystupidrighthere function for palceatme. It seemed native and simple in FO3/NV. Maybe they  just made the TES stuff over complicated? Did they really fork FO and TES that much?

I had this working

(not there are 5 of these just showing the 1-1 and not up to 5-5)

Spell magiceffect1-1> explosion1-1> enchantment1-1>

1-1 set at getrandompercent 80% , 2-1 set at getrandompercent 80% , 3-1 set at getrandompercent 80% , 4-1 set at getrandompercent 80% ,

(on this set it has a 80% chance)

magiceffect2-1> explosion2-1> enchantment2-1>

3-1 set at getrandompercent 80% , 3-2 set at getrandompercent 80% , 3-3 set at getrandompercent 80% , 3-4 set at getrandompercent 80%  all have hasmagiceffect to ensure only one moves to the next step

(on this set it has a 64% chance)

magiceffect3-1> explosion3-1> enchantment3-1>

4-1 set at getrandompercent 95% , 4-2 set at getrandompercent 70% , 4-3 set at getrandompercent 50% , 4-3 set at getrandompercent 20%  all have hasmagiceffect to ensure only one moves to the next step

(set 3-1 has a 57% chance, set 3-2 has a 44% chance, set 3-3 has a 32% chance, set 3-4 has a 12% chance)

 

magiceffect4-1> explosion4-1> enchantment4-1>

3-1 set at getrandompercent 90% , 3-2 set at getrandompercent 90% , 3-3 set at getrandompercent 80% , 4-3 set at getrandompercent 70%  all have hasmagiceffect to ensure only one moves to the next step

(set 5-1 has a 57% chance, set 5-2 has a 44% chance, set 5-3 has a 32% chance, set 5-4 has a 12% chance)

 

magiceffect5-1> explosion5-1> enchantment5-1>finalmagiceffect=one of my 5 spell effects.

 

I was tooling around and thought can’t I do with destruction data…but how do I make sure only one of the random finalmagiceffect fires off?  You can stack it but reanimation LOATHS stacking it really needs only fire off one of the finalmagiceffects once.

 

I had a perfectly working spell script but the only spells that would work are projectile based thus if a spell fires off its going to send a projectile…. Er wait a sec  spell to script that fires off explosion based spells? …. Wait…  don’t tell me…….. I get lost in figuring out the long way since thats what Skyrim likes 80% of the time…. Let me test it…….

Link to comment
Share on other sites

I can help you with attaching scripts to explosions, but the rest is up to you.

I know I am just ramlbing in the hopes any other helpful thoughts pop up. I just realized with my coffee in hand looking over stuff that it dose not matter where in my chain the spell or enchantment is called for if a script fires it the script has to say where it starts so I still need something to something other than actor.

 

sorry premature post

Link to comment
Share on other sites

Just a shot in the blue. is it anything like what DSoS was doing here or here?

Kinda you see I want to cast a spell that casts another spell or uses an enchantment on pure hit location not being attached to the ground or the target to fire off the event. But I guess references is something I need to look into.  I wonder if spawnmyref in the effect archetype will do the trick but I still need to have the correct script.

Link to comment
Share on other sites

And an activator is so easy to use.... man I got lost down a rabbit hole ><

 

 

And here it is. Anyone think doing an array of some type be better?

 

Not 100% sure if I under stand them they seem to go from one to the next, but I am unsure if they can pass/fail and on fail move to next..

Scriptname zippytestscriptreanimate1 extends ObjectReference


import utility ;= used for a utility function=======/
import Debug;= not sure if I need this=======/

;======================================================================================;
; PROPERTIES /
;=============/




;======================================================================================;
; VARIABLES /
;=============/



Objectreference zippytestactivator
explosion property explosionzippyrandyreanimate1 auto
explosion property explosionzippyrandyreanimate2 auto
explosion property explosionzippyrandyreanimate3 auto
explosion property explosionzippyrandyreanimate4 auto
;= skyrim property ,allows change of explosion in CK GUI=======/

;======================================================================================;
; EVENTS /
;=============/



Event OnInit()

int myRan1 = Utility.RandomInt (1, 100) ;= sets up the range of the random utility=======/
int myRan2 = Utility.RandomInt (1, 100)
int myRan3 = Utility.RandomInt (1, 100)
int myRan4 = Utility.RandomInt (1, 100)

If myRan1 <= 90.0 ;= this means 90% chance to work=======/

wait(RandomFloat(0,0.1)) ;= ranges for waiting for a random period of time, not used right now but it complies =======/
placeatme(explosionzippyrandyreanimate1) ;= this calls to the explosion itself ,allows change of explosion in CK GUI=======/

elseif myRan2 <= 50.0 ;= else makes it so if the above fails this will fire off 50% of the time =======/

wait(RandomFloat(0,0.1))
placeatme(explosionzippyrandyreanimate2)

elseif myRan3 <= 50.0

wait(RandomFloat(0,0.1))
placeatme(explosionzippyrandyreanimate3)

elseif myRan4 <= 25.0

wait(RandomFloat(0,0.1))
placeatme(explosionzippyrandyreanimate4)


Endif ;= ends the if call statement thingy=======/



EndEvent ;= ends the event=======/

Event OnLoad()
zippytestactivator= self
utility.wait(2)
    self.Disable()
self.Delete()
EndEvent ;= ends the event=======/



 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...