Jump to content

AkTarget argument of OnEffectStart is pointing to [WIDeadBodyCleanupScript


Recommended Posts

Posted

CursedSchlong_helpRequest-04-02-16.zip

 

I have a very basic magic effect script here.  All it does is equip an item to the target.  Unfortunately, that's not happening.  Here's the script in question:

Scriptname JBT_EquipCursedSchlongEffectScript extends activemagiceffect  

	Armor Property itemToEquip auto

	Event OnEffectStart(Actor akTarget, Actor akCaster)
		Dispel()
	EndEvent
	
	Event OnEffectFinish(Actor akTarget, Actor akCaster)
	
		Debug.Notification("Equipping item " + itemToEquip.GetName() + " to " + akTarget.GetName())
	
		;Equip the schlong
		akTarget.EquipItemEx(itemToEquip, 0)
	
	EndEvent

When I cast the spell on someone, it prints out "Equipping item Cursed Schlong to  ", as if the actor's name were blank.

If I replace "akTarget.GetName()" with "akTarget", it prints out "Equipping item Cursed Schlong to  [WIDeadBodyCleanupScript".  Note the lack of a closing brace.  If I cast the spell on an inn keeper, it prints the name of a different script(I can't remember the name, but it's something about renting a room).

I'm 80% confident that my script isn't the problem, seeing as this is the most simple magic effect conceivable.  My theory: it's something to do with how I set up the spell in Creation Kit.  Since I can't simply copy/paste an .esp file into a form post, I've uploaded my mod as an attachment so you can maybe see what the problem is.
 

To test it, open the Cursed Schlong MCM and click "enable debug spell".  Cast the spell that gets added on a target.

 

The ESP lists SexLab, and SOS Equippable Schlong as requirements, although it should also have SkyUI as a requirement(forgot to add that).  To help you located the problem, here are all of the records my ESP adds.

  • Armor
    • JBT_CursedSchlong
  • Magic Effect
    • JBT_EquipCursedSchlongEffect
  • Quest
    • JBT_CursedSchlongQuest
  • Scroll
    • JBT_EquipCursedSchlongScroll
  • Spell
    • JBT_EquipCursedSchlongSpell

I hope I've given enough info to make finding the problem as easy as possible.  Thanks in advance for going to such lengths to debug what's probably a really silly mistake.

Posted

.getName() will not give you the Actor name.

 

If you need it you should use .getDisplayName() (that is valid for all ObjectReferences)

 

Posted

Thanks!  That solves the problem!

Well...sort of.  It still wasn't equipping the schlong for some reason.  I ended up fixing *that* problem by simply renaming itemToEquip to JBT_CursedSchlong and then auto-filling the property.  Which is strange, because manually filling it like before should have had the same effect.

Posted

Thanks!  That solves the problem!

 

Well...sort of.  It still wasn't equipping the schlong for some reason.  I ended up fixing *that* problem by simply renaming itemToEquip to JBT_CursedSchlong and then auto-filling the property.  Which is strange, because manually filling it like before should have had the same effect.

 

Warning about this.

If you "equip a schlong" then it may be overwritten by SOS. So you may got luck one time and not lucky another.

It depends on when SOS will catch the undressing and adds a schlong to the actor.

Posted

Nah, this spell is supposed to be used on females.  The item it equips is a duplicate of SOS Equippable Schlong, but with a special script attached that prevents removable until a certain number of orgasms have been reached.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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