Jump to content

Need help with some Scripting code.


UglyDucklingStudios

Recommended Posts

Hello people reading this topic! I am having a bit of trouble with some code I'm trying to make to detect how many items a player has. I know you have to use the Player.GetItemCount command but it doesn't seem to be working for me. here is the code:

 

scn 00ItemDetector

Begin GameMode == 1

 

Player.GetItemCount Pencil01

 

if Player.GetItemCount Pencil01 == 30

SetStage 00RT 20

endif

end

 

Now by what the geck.bethsoft.com site explains the Player.GetItemCount command, this should work. And I get no error when I save and close the scripting menu in the G.E.C.K. But when I go into game and pick up 30 pencils nothing happens. So if you know why this is happening please reply to this topic. And as always have a nice day!

Edited by UglyDucklingStudios
Link to comment
Share on other sites

Did you attach the script to a quest or activator? Just having the script in your plugin won't do anything.

 

Also there is no need for the first line under "Begin GameMode" (player.getItemCount Pencil01). 

Link to comment
Share on other sites

Yes that was the problem. Didn't know it had to be attached to something. New to scripting. Thank you so much for the help!

Did you attach the script to a quest or activator? Just having the script in your plugin won't do anything.

 

Also there is no need for the first line under "Begin GameMode" (player.getItemCount Pencil01).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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