Jump to content

Help with a leafblower script, please


Recommended Posts

I am trying to make a leafblower attachment for a gun. Here's what I've done so far:

  1. Made a suppressor mod for the combat shotgun that overrides the projectile with my leafblower projectile.
  2. Made an explosion attached to the projectile that spawns a dummy trigger activator with a script
  3. Made a form list with all the statics I want to clear.
  4. The dummy trigger script is supposed to detect any nearby flat trash or leaf piles on the form list and delete/disable them.
  5. it doesn't.

Here's the script

scriptName _gkx_cleartrash extends ObjectReference

formlist property clearlist auto mandatory

Event OnInit()

	objectreference closestpile = Game.FindClosestReferenceOfAnyTypeInListFromRef(clearlist, self, 200)
	closestpile.disable()
	closestpile.delete()
	self.disable()
	self.delete()

EndEvent

Am I way out in left field here? Am I missing something pertinent? I'm not a scripting guru, my expertise extends to "looking things up on the wiki", so any help would be appreciated.

 

~GKX

Link to comment
Share on other sites

  • Recently Browsing   0 members

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