UglyDucklingStudios Posted June 14, 2012 Share Posted June 14, 2012 (edited) 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 00ItemDetectorBegin GameMode == 1 Player.GetItemCount Pencil01 if Player.GetItemCount Pencil01 == 30 SetStage 00RT 20endifend 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 June 14, 2012 by UglyDucklingStudios Link to comment Share on other sites More sharing options...
dino1206 Posted June 14, 2012 Share Posted June 14, 2012 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 More sharing options...
UglyDucklingStudios Posted June 14, 2012 Author Share Posted June 14, 2012 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 More sharing options...
Cyberlazy Posted June 15, 2012 Share Posted June 15, 2012 Begin GameModeinstead ofBegin GameMode == 1I have no idea if 'Begin GameMode == 1' works or not, but geck script gets cranky when everything is not just right. Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted June 15, 2012 Share Posted June 15, 2012 Also don't start questIDs, refIDs, etc with numeric characters if you are going to use them in a script. Link to comment Share on other sites More sharing options...
Recommended Posts