EternalDamned Posted April 3, 2014 Posted April 3, 2014 SO I am trying to cast a spell on the an NPC after completing sex with them.  Scriptname AAFuckEnemy extends activemagiceffect  SexLabFramework property SexLab autoSpell property aaKillerCumShotSpell autoevent OnInit()   RegisterForModEvent("AnimationEnd", "KillerCumShot")endEventfunction OnEffectStart(actor cock, actor victim)      Utility.Wait(1.0)           actor[] sexActors = new actor[2]           sexActors[0] = victim           sexActors[1] = cock           sslBaseAnimation[] anims = SexLab.GetAnimationsByType(2, aggressive=true)          Int id = SexLab.StartSex(sexActors, anims, victim = victim)endfunctionevent KillerCumShot(string eventName, string argString, float argNum, form sender)   aaKillerCumShotSpell.cast(self, self)endEvent  This is the error I get: C:\MyGames\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AAFuckEnemy.psc(21,22): type mismatch on parameter 1 (did you forget a cast?)C:\MyGames\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AAFuckEnemy.psc(21,22): type mismatch on parameter 2 (did you forget a cast?) Anyone able to help?
shane4244 Posted April 4, 2014 Posted April 4, 2014 What property do you have assigned to "Self" in aaKillerCumShotSpell.cast(self, self) Normally when i have an error like that it's because it doesn't think I have a valid actor/object type for the function.
Ashal Posted April 4, 2014 Posted April 4, 2014 self references your activemagiceffect script, and Spell.Cast() expects 2 actor arguments, what your looking for is probably something like this: aaKillerCumShotSpell.Cast(GetCasterActor(), GetTargetActor()) See:Â http://www.creationkit.com/ActiveMagicEffect_Script &Â http://www.creationkit.com/Cast_-_Spell
EternalDamned Posted April 4, 2014 Author Posted April 4, 2014 Ok I did what you suggested Ashal and it worked to a point. Compiled no problem, so I go in game and it does damage but not nearly what it should. It should be a slow kill over about 5 seconds instead, what it does is 15 damage instantly. Now the really puzzling part, is that it only works even that much, when I have SexLab Consequences installed. The mod does not have to be active, just installed, and the esp in my load order. If I uncheck the esp, my spell does nothing?!? And I know the spell itself works perfectly. I made 2 versions, one self delivery and one aimed everything else the same. Tested it dozens of times, and it does 5 damage per second for 120 seconds. I even tried using the other version of the spell with me doing the casting instead of it being self cast by the NPC and it does the exact same thing. I know this can be done, since it's really no different function wise than having calm cast at the end of a rape, and several mods do that. Unfortunately all of those either don't include sript source, or have it burried in interconnecting scripts that have me totally confuzzled.
EternalDamned Posted April 5, 2014 Author Posted April 5, 2014 Still can't get my spell to work right no matter what I try, but I was able to edit sexlab util1 to come close to the effect I wanted. Still need to slow down the death a little bit, but getting much closer.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.