Garrulous Glaahk Yellow Sub Posted July 6, 2004 Share Posted July 6, 2004 Code: beginstate 11;//Potion of Boom print_str_color("The potion explodes!",2); put_boom_on_char(1,0,0); run_animation_sound(5); damage_nearby(50,7,1,2); break; Whats this mean? Procedure error? It doesn't make any sense. Link to comment Share on other sites More sharing options...
Kyshakk Koan PoD person Posted July 6, 2004 Share Posted July 6, 2004 This is just a guess, but is run_animation_sound a call? I think it's play_sound, but I posted this without looking at the docs, so I'm not sure. Link to comment Share on other sites More sharing options...
Burgeoning Battle Gamma Kiexcolo Posted July 6, 2004 Share Posted July 6, 2004 I'm not sure of this because I have not tried animations yet but I think its because you didn't use run_animation() but called run_animation_sound(). Maybe you can use prophet's suggestion of play_sound instead. Edit: Nope, that was not it, run_animation_sound is the same as run_animation. Ignore. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted July 6, 2004 Share Posted July 6, 2004 The call run_animation_sound is fine. I'm just guessing here, but do you need a space between the semi-colon and the comments? Like, beginstate 11; // Potion of Boom Which line is it saying is the problem? EDIT: The docs' description of a procedure error is especially unhelpful. Wow. Something went wrong trying to use this function. That's why the error is there. No kidding. That's helpful. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Fort Posted July 6, 2004 Share Posted July 6, 2004 damage_nearby can only be called in creature or terrain scripts, not in town states. By the way, what exactly is the purpose of this state and in what circumstance is it called? Are you sure you want to "put_boom_on_char[acter]" 1, which is PC 2? I'm not sure if it'll work, but maybe you should use -1 as the value. Might not work for the same reason damage_nearby doesn't. Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Namothil Posted July 6, 2004 Share Posted July 6, 2004 This appears to be a script for a custom item. That being the case, you would want to use who_used_custom_item() in put_boom_on_char() To replace damage nearby, I suggest looking at damage_near_loc() using char_loc_x() and char_loc_y() to get the location of the character who used the item. You'll want to include blocks to prevent the item from being used outdoors. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Yellow Sub Posted July 6, 2004 Author Share Posted July 6, 2004 Thank you for your input. Ill try eliminating the damage_nearby thingy. Ill post the results in a minute. EDIT! UPDATE I fixed it up without blocking the party just yet to see if the base thing will work(ill block the party from outdoor usage once this is worked out) Bad expression in line 98. I dont see why it would though. Code: beginstate 11;//Potion of Boomprint_str_color("The potion explodes!",2);put_boom_on_char(who_used_custom_item(),0,0);run_animation_sound(5);LINE 98::damage_near_loc(char_loc_x(),char_loc_y(),50,6,1);break; Note that the word LINE 98 is not actually in the code. Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted July 7, 2004 Share Posted July 7, 2004 char_loc_x() and char_loc_y() both need an argument to know which char's location you're trying to get. Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Namothil Posted July 7, 2004 Share Posted July 7, 2004 Sorry about that. I thought it was obvious that I was ommiting arguments. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Yellow Sub Posted July 7, 2004 Author Share Posted July 7, 2004 Quote: Originally written by spyderbytes:char_loc_x() and char_loc_y() both need an argument to know which char's location you're trying to get. whats an argument? you mean char_loc_x(0) char_loc_y(0)? That may put the boom on the wrong charecter! Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Namothil Posted July 7, 2004 Share Posted July 7, 2004 Use who_used_custom_item() again. Link to comment Share on other sites More sharing options...
Recommended Posts