script help..

Post » Mon Jun 18, 2012 10:31 pm

Scriptname perkscript extends ActiveMagicEffect  ;Variables;;actor CasterActoractor victim;objectreference playerrefbool Deadalready = true;;Event OnEffectStart(Actor Target, Actor Caster)	  victim = target	  CasterActor = Caster	  DeadAlready = Victim.IsDead()EndEventEvent OnEffectFinish(Actor Target, Actor Caster)	  if DeadAlready == true	   Game.GetPlayer().addPerk("myperkhere")endifEndEvent

Starting 1 compile threads for 1 files...Compiling "perkscript"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\perkscript.psc(20,24): type mismatch on parameter 1 (did you forget a cast?)No output generated for perkscript, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on perkscript

Part of this script came from a vampire script...this is only a test script though.
User avatar
Poetic Vice
 
Posts: 3440
Joined: Wed Oct 31, 2007 8:19 pm

Post » Tue Jun 19, 2012 4:25 am

Actor.AddPerk() does not take a string, it takes a perk. You have to declare a property for the perk and fill it in the CK.
Perk Property myperkhere autoevent stuff...Game.GetPlayer().AddPerk(myperkhere) 
User avatar
Khamaji Taylor
 
Posts: 3437
Joined: Sun Jul 29, 2007 6:15 am

Post » Mon Jun 18, 2012 10:14 pm

You forget to add perk

Game.GetPlayer().addPerk("myperkhere")
User avatar
Toby Green
 
Posts: 3365
Joined: Sun May 27, 2007 5:27 pm

Post » Mon Jun 18, 2012 7:04 pm

^Err that was a removal on my part, since giving away the name of the perk(as well as the name of the script itself) gives away exactly what I'm aiming for, which I'm not ready to reveal yet, until this particular idea becomes reality.

And thanks fowl.

Edit: Same error still pops up.
User avatar
alicia hillier
 
Posts: 3387
Joined: Tue Feb 06, 2007 2:57 am

Post » Tue Jun 19, 2012 12:03 am

You'll need to declare a property for the perk and connect it to the script. I'll find a link soon that explains this :D

Edit: www.creationkit.com/Bethesda_Tutorial_Papyrus_Introduction_to_Properties_and_Functions#Creating_Messageboxes
User avatar
Nicole M
 
Posts: 3501
Joined: Thu Jun 15, 2006 6:31 am

Post » Tue Jun 19, 2012 12:42 am

Script successfully compiled. Testing it now to see if it works.
User avatar
Killer McCracken
 
Posts: 3456
Joined: Wed Feb 14, 2007 9:57 pm

Post » Mon Jun 18, 2012 7:37 pm

Not working as intended. Oh well. I think this is idea is too advanced for me right now.
User avatar
JUDY FIGHTS
 
Posts: 3420
Joined: Fri Jun 23, 2006 4:25 am

Post » Mon Jun 18, 2012 6:04 pm

I rewrote the script differently. But it still doesn't work in game. I've posted the new code as well as the error log.

ScriptName justatestscript extends activemagiceffectActor VictimActor CasterActorbool DeadAlready = TrueObjectReference property SoulGemGrand autoEvent onEffectStart(Actor Target, Actor Caster)	  victim = target	  CasterActor = Caster	  Victim.IsDead()EndEventEvent OnEffectFinish(Actor Target, Actor Caster)	   if DeadAlready == True	   Game.GetPlayer().additem(SoulGemGrand, 1, false)	  endifEndEvent

[None].justatestscript.OnEffectFinish() - "justatestscript.psc" Line ?[02/18/2012 - 03:57:11PM] error: Cannot add None to a containerstack:	[ (00000014)].Actor.AddItem() - "" Line ?	[None].justatestscript.OnEffectFinish() - "justatestscript.psc" Line ?[02/18/2012 - 03:57:11PM] error: Cannot add None to a containerstack:	[ (00000014)].Actor.AddItem() - "" Line ?	[None].justatestscript.OnEffectFinish() - "justatestscript.psc" Line ?[02/18/2012 - 03:57:34PM] error: Object reference has no 3Dstack:	[ (0001E68C)].Sound.Play() - "" Line ?	[ (000EF1EF)].fxDustDropRandomSCRIPT.OnLoad() - "fxDustDropRandomSCRIPT.psc" Line ?[02/18/2012 - 03:57:48PM] VM is freezing...[02/18/2012 - 03:57:48PM] VM is frozen[02/18/2012 - 03:57:48PM] Log closed
Says none, but I already have what I want in the script @_@.
User avatar
Evaa
 
Posts: 3502
Joined: Mon Dec 18, 2006 9:11 am

Post » Tue Jun 19, 2012 6:46 am

ScriptName justatestscript extends ActiveMagicEffectInt bAlreadyDead = 0SoulGem Property SoulGemGrand Auto Event OnEffectStart(Actor akTarget, Actor akCaster)        If akTarget.IsDead()                bAlreadyDead = 1        EndIfEndEvent;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Event OnEffectFinish(Actor akTarget, Actor akCaster)        If bAlreadyDead        ElseIf akTarget.IsDead()                If akCaster == Game.GetPlayer()                        akCaster.AddItem(SoulGemGrand, 1)                EndIf        EndIfEndEvent

???
User avatar
KU Fint
 
Posts: 3402
Joined: Mon Dec 04, 2006 4:00 pm

Post » Tue Jun 19, 2012 1:13 am

You wouldn't believe me if I told you where I got that from, but it does exist..in an existing script in the game XD. You see what I want to do; The base of the idea comes from the werewolf and vampire scripts.

I'll just tell you what I want to do, so we can get rid of that apparently, useless thing XD.

Simply put; A scripted spell that extracts an object from a dead NPC. An already dead NPC. And only works on a dead NPC.

Edit: Ok I see your edit. :o
User avatar
Barbequtie
 
Posts: 3410
Joined: Mon Jun 19, 2006 11:34 pm

Post » Tue Jun 19, 2012 7:03 am

Thats for that, I'll be studying that.

I sat there for awhile trying to figure out what was so different about your post then I caught on XD.

It still doesn't work though and I think this is because of the way I set up the magic effect. I'm too lazy to do that now.

(and all my script questions and issues I'll put in this thread)
User avatar
Dan Stevens
 
Posts: 3429
Joined: Thu Jun 14, 2007 5:00 pm

Post » Tue Jun 19, 2012 3:11 am

AH, I thought you were aiming for a WoW Warlock soul svcking beam...
User avatar
Pixie
 
Posts: 3430
Joined: Sat Oct 07, 2006 4:50 am

Post » Mon Jun 18, 2012 9:24 pm

That was the initial idea(I never played WoW though.) and that absorbing their soul powers up your destruction spells for a certain amount of time. Similar to Soul Trap, except their soul becomes part of you and not part of a gem. The Gem script is just a test to see if this can actually be pulled off.
User avatar
Nathan Hunter
 
Posts: 3464
Joined: Sun Apr 29, 2007 9:58 am


Return to V - Skyrim