Why is my script not working?

Post » Sat Nov 17, 2012 4:40 am

Hi Guys any help is welcome

Why is my script not working? I set the script's property as an action which may be the problem


Scriptname MAOnDeathDameDeVix extends ObjectReference

Action Property AddSpellOnDeath Auto

Event OnDeath(Actor killer)
Player.addSpell 0200412C
EndEvent
User avatar
yermom
 
Posts: 3323
Joined: Mon Oct 15, 2007 12:56 pm

Post » Fri Nov 16, 2012 10:22 pm

Is this part of a quest mate?
User avatar
Vera Maslar
 
Posts: 3468
Joined: Wed Sep 27, 2006 2:32 pm

Post » Fri Nov 16, 2012 6:41 pm

Hi Guys any help is welcome

Why is my script not working? I set the script's property as an action which may be the problem


Scriptname MAOnDeathDameDeVix extends ObjectReference

Action Property AddSpellOnDeath Auto

Event OnDeath(Actor killer)
Player.addSpell 0200412C
EndEvent

You need to change it to:

Scriptname MAOnDeathDameDeVix extends ObjectReference  Actor Property playerRef autoSpell Property AddSpellOnDeath  auto  Event OnDeath(Actor killer)  playerRef.addSpell(AddSpellOnDeath)EndEvent

Assuming the spell you wish to add has the editor ID ''AddSpellOnDeath'' in creation kit you can just enter the properties window and press auto-fill all. Otherwise you need to fill the property for the spell manually (can still auto-fill playerRef)
User avatar
sas
 
Posts: 3435
Joined: Thu Aug 03, 2006 8:40 am

Post » Fri Nov 16, 2012 8:33 pm

Is this part of a quest mate?
no it is a simple spell that the player should get on death of an "Actore" in this case a Wisp...I try without adding any property but it does not compile.
any help is welcome at this point
User avatar
Damian Parsons
 
Posts: 3375
Joined: Wed Nov 07, 2007 6:48 am

Post » Sat Nov 17, 2012 9:29 am

The spell is a custom spell shouldn't I add the spell ID?
User avatar
pinar
 
Posts: 3453
Joined: Thu Apr 19, 2007 1:35 pm

Post » Sat Nov 17, 2012 9:36 am

The spell is a custom spell shouldn't I add the spell ID?

You choose the spell when you add the spell property to the script. So rather than calling the spell to add by it's ID, you call the property, which is linked to the spell. I think that's what Borgut means.
User avatar
kirsty joanne hines
 
Posts: 3361
Joined: Fri Aug 18, 2006 10:06 am

Post » Sat Nov 17, 2012 9:09 am

ok I am trying the bugger and will report
User avatar
Connor Wing
 
Posts: 3465
Joined: Wed Jun 20, 2007 1:22 am

Post » Sat Nov 17, 2012 2:50 am

ok here is the script, it compiles just fine except in game when I do kill the wisp the spell does not add to my magic inventory...

Scriptname OnDeathDameScript extends ObjectReference

Actor Property playerRef auto
Spell Property ConjureDameDeVix auto

Event OnDeath(Actor killer)
playerRef.addSpell(ConjureDameDeVix)
EndEvent
User avatar
Julie Ann
 
Posts: 3383
Joined: Thu Aug 23, 2007 5:17 am

Post » Sat Nov 17, 2012 8:42 am

ok here is the script, it compiles just fine except in game when I do kill the wisp the spell does not add to my magic inventory...

Scriptname OnDeathDameScript extends ObjectReference

Actor Property playerRef auto
Spell Property ConjureDameDeVix auto

Event OnDeath(Actor killer)
playerRef.addSpell(ConjureDameDeVix)
EndEvent

I guess u forgot to set the properties. Did you take a look at some tutorials already on www.creationkit.com, or did you jump right into it? There are some large differences between skyrim scripting and previous bethesda games (properties being one of them), so i would advise you to look at some scripting tutorials first :P

As for how to fix your current problem, you need to rightclick the script you've attached and click ''Edit Properties'' and set them up as I described in previous post.
User avatar
Killer McCracken
 
Posts: 3456
Joined: Wed Feb 14, 2007 9:57 pm

Post » Fri Nov 16, 2012 5:48 pm

I guess u forgot to set the properties. Did you take a look at some tutorials already on www.creationkit.com, or did you jump right into it? There are some large differences between skyrim scripting and previous bethesda games (properties being one of them), so i would advise you to look at some scripting tutorials first :tongue:

As for how to fix your current problem, you need to rightclick the script you've attached and click ''Edit Properties'' and set them up as I described in previous post.

Thanks Man, it worked...thanks again for your patience
User avatar
Irmacuba
 
Posts: 3531
Joined: Sat Mar 31, 2007 2:54 am


Return to V - Skyrim