Jump to content

Dynamicly place explosion on location script for dummies(and me).


ZippyDSMlee

Recommended Posts

I know I am the least qualified to make one of these but I thought it'd be helpful for new people to find this via the title and what not.

If it needs refinement go ahead and say what ti needs I will update as needed.

---------------------------------

 

This must be done via an activator.

 

 

Make a duplicate of VoiceCastMarker, remove the script make new script extends ObjectReference add script below the green ==== bars.

 

 

Your activator name should be the same activator name

Your explosion name should be the same explosion name

 

 

YOU MUST SET THE PROPERTIES OF THE EXPLOSION IN THE CK TAB IF YOU DO NOT IT WILL NOT WORK(and may or may not be lost down a rabbit hole of coding hell for 3 days)

 

 

Make a duplicate of fakeForceBallNudge, call it whatever NULL explosion, add your activator to the place object tab.

 

 

Add this null explosion ONLY to your base magic effect(if you are trying this you should know what to do) in the explosion tab or via explosion for a projectile(if you are trying this you should know what to do).

 

 

So your Spell/Weapon Enchantment/Projectile you are shooting directly calls to your null explosion which calls to YOURACTIVATOR which has YOURSCRIPTNAME and its explosion property set that calls to YOUREXPLOSION.

 

 

Would a more advance setup utilize an array better? Anyone want to make an array version of this? Add a couple getrandom floats 3 explosions if you need more food for the array to work.

 

----------------

Note this line below is formatted as so the game/compiler ignores it and is used for comments and explanations.

;== comment/explanation text goes here =======/

----------------

=====================================================

=====================================================

 

 

 

Scriptname YOURSCRIPTNAME extends ObjectReference ;== script name and what it extends=======/

 

 

import utility ;= used for a utility function=======/

import Debug;= not sure if this is need=======/

 

;======================================================================================;

; PROPERTIES /

;=============/

 

 

Objectreference YOURACTIVATOR ;== Object reference of your activator=======/

explosion property YOUREXPLOSION auto ;== you explosion property, make sure to set in CK =======/

 

;======================================================================================;

; VARIABLES /

;=============/

 

 

 

 

;======================================================================================;

; EVENTS /

;=============/

 

 

 

Event OnInit() ;= Starts up script when activator is created in world=======/

placeatme(YOUREXPLOSION) ;= this calls to the explosion itself ,DO NOT FORGET TO SET IN THE CK=======/

 

 

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

 

Event OnLoad() ;= loaded after OnInit =======/

YOURACTIVATOR = self ;== makes the activator self allowing for removal from disable and delete calls below=======/

utility.wait(2) ;== wait 2 seconds before disable/delete=======/

self.Disable() ;== Disables your activator =======/

self.Delete() ;== Deletes your activator, do we need any markfordelete or other calls to ensure clean removal?=======/

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

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...