Jump to content

Problems with an object


niallmcfc

Recommended Posts

I've made this script:

 

Scriptname alchemiseFoodOBJECT extends ObjectReference  
{Turns food into ingredients from a pedestal}

import game

Ingredient Property FoodApple auto
Ingredient Property IngrApple01 auto
Sound Property FailureSFX  Auto  
message property TransmuteFoodMSG auto


EVENT OnActivate(ObjectReference akActionRef)
objectReference caster = Game.GetPlayer()
if caster.getItemCount(FoodApple) >= 1
	caster.removeItem(FoodApple, 1, TRUE)
	caster.addItem(IngrApple01, 1, FALSE)
else
	FailureSFX.play(caster)
	TransmuteFoodMSG.show()
endif
endEVENT

 

Short explanation: when you activate the button it's attached to, it checks if you have a red apple, if you do, it removes it and adds another apple. When I activate the pedestal with or without an apple, nothing happens. No noise, no text. If anyone could help with this, I'd really appreciate it.

Link to comment
Share on other sites

i dont know much about scripting but just pointing out that auto is written with a capital after sound property and is not the same colour although i presume is should be

and on the next line message is written without a capital. i dont expect this to be much help but consitency is always better. good luck

Link to comment
Share on other sites

  • Recently Browsing   0 members

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