Jump to content

Enable Script Compiled but I can't Activate it


Recommended Posts

Scriptname __0SMF_PurchasePet extends ObjectReference Const


STATIC Property EnableMarker Auto Const


Message Property BuyAPet Auto Const


Int Property CostToBuy Auto Const


MiscObject Property Caps001 Auto Const


Event OnActivate(ObjectReference akActionRef)

int selectedOption = BuyAPet.Show()

If (selectedOption == 1) ; Cancel

return

EndIf

If (Game.GetPlayer().GetItemCount(Caps001) < CostToBuy) ; Player doesn't have enough caps

Debug.Notification("You need more Caps")

return

EndIf

Game.GetPlayer().RemoveItem(Caps001, CostToBuy)


If (SelectedOption == 0); Cat

EnableMarker

EndIf

EndEvent



It compiles fine but nothing happens where have I gone wrong ?

Link to comment
Share on other sites

I updated the Script

Scriptname __0SMF_BuyAPet2 extends ObjectReference Const
Actor Property Cat Auto Const
Int Property CostToBuy Auto Const
Message Property BuyAPet Auto Const
MiscObject Property Caps001 Auto Const
Keyword Property Cat2Player Auto Const
SPELL Property TeleportIn Auto Const
STATIC Property TelePortInMarker Auto Const
Event OnActivate(ObjectReference akActionRef)
int selectedOption = BuyAPet.Show()
If (selectedOption == 1) ; Cancel
return
EndIf
If (Game.GetPlayer().GetItemCount(Caps001) < CostToBuy) ; Player doesn't have enough caps
Debug.Notification("You need more Caps")
return
EndIf
Game.GetPlayer().RemoveItem(Caps001, CostToBuy)
If (SelectedOption==0);
TelePortIn.Cast(Cat)
EndIf
EndEvent
How would I reference the Location the Cat Needs to Teleport too ?
Link to comment
Share on other sites

  • Recently Browsing   0 members

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