Easygoing Eyebeast Thralni Posted September 30, 2006 Share Posted September 30, 2006 I want a script to check whether there is a specific item on a specific spot, but I didn't find the right call. I only found "item_of_class_on_spot" and that was basically it. is there the call i want (a call to check whether a specific items was put on a specific spot), or will I have to do it with the item_of_class call? Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted September 30, 2006 Share Posted September 30, 2006 Odd. I thought there was a call for that. It looks like you're stuck with item_of_class_on_spot. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted October 1, 2006 Author Share Posted October 1, 2006 I tried the following: Code: beginstate START_STATE;if (get_flag(13,5) == 0 && item_of_class_on_spot(26,33,1) == 1); set_flag(13,5,1);if (get_flag(13,5) == 4 && item_of_class_on_spot(34,33,2) == 1); set_flag(13,5,5);break; It doesn't seem to work. Anybody know what the cause could be? Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted October 1, 2006 Share Posted October 1, 2006 Make sure you have the items set to a special class. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted October 1, 2006 Author Share Posted October 1, 2006 I did that, didn't I? The third parameter in between the brackets (1 at the first call, 2 at the second), is the item class. Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody wz. As Posted October 1, 2006 Share Posted October 1, 2006 Are there supposed to be semicolons after the "if" statements? Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted October 1, 2006 Share Posted October 1, 2006 I mean that you have to set that specific item to that class in your scenario data script. Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted October 1, 2006 Share Posted October 1, 2006 Quote: Originally written by wz. As:Are there supposed to be semicolons after the "if" statements? No. Also, if I were writing it, I'd practise safe mathematics and use parentheses: Code: if ((get_flag(13,5) == 0) && (item_of_class_on_spot(26,33,1) == 1)) set_flag(13,5,1); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.