Articulate Vlish demipomme Posted November 4, 2004 Share Posted November 4, 2004 Does anyone know why the call put_field_on_space does not reliably put a field on a space? By this I mean it does it most of the time, but not 100% of the time. Does anyone know a way to fix this? Thanks Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted November 5, 2004 Share Posted November 5, 2004 Can you give an example when it does not do so? Link to comment Share on other sites More sharing options...
Chittering Clawbug Captain Obvious Posted November 5, 2004 Share Posted November 5, 2004 put_field_on_space(x,y,n) put_field_on_space(x,y,n) i used this call (i don't remember the actual format) and used 6 for the space (quickfire) and put in the EXACT coordinates (i know i checked like 5 times) and only one showed up. there is your example. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted November 5, 2004 Share Posted November 5, 2004 I meant actually post the script. Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted November 5, 2004 Share Posted November 5, 2004 It'd also help if we knew a little about the map; whether there were terrains, monsters, other fields, etc. on the spaces you tried to stick fields on. Link to comment Share on other sites More sharing options...
Articulate Vlish demipomme Posted November 5, 2004 Author Share Posted November 5, 2004 beginstate START_STATE; if (is_field_on_space(39,38,2) == 0) put_field_on_space(39,38,2); if (is_field_on_space(40,38,2) == 0) put_field_on_space(40,38,2); if (is_field_on_space(41,38,2) == 0) put_field_on_space(41,38,2); if (is_field_on_space(42,38,2) == 0) put_field_on_space(42,38,2); if (is_field_on_space(38,39,2) == 0) put_field_on_space(38,39,2); if (is_field_on_space(39,39,2) == 0) put_field_on_space(39,39,2); if (is_field_on_space(40,39,2) == 0) put_field_on_space(40,39,2); if (is_field_on_space(41,39,2) == 0) put_field_on_space(41,39,2); if (is_field_on_space(42,39,2) == 0) put_field_on_space(42,39,2); if (is_field_on_space(43,39,2) == 0) put_field_on_space(43,39,2); if (is_field_on_space(38,40,2) == 0) put_field_on_space(38,40,2); if (is_field_on_space(39,40,2) == 0) put_field_on_space(39,40,2); if (is_field_on_space(40,40,2) == 0) put_field_on_space(40,40,2); if (is_field_on_space(41,40,2) == 0) put_field_on_space(41,40,2); if (is_field_on_space(42,40,2) == 0) put_field_on_space(42,40,2); if (is_field_on_space(43,40,2) == 0) put_field_on_space(43,40,2); if (is_field_on_space(38,41,2) == 0) put_field_on_space(38,41,2); if (is_field_on_space(39,41,2) == 0) put_field_on_space(39,41,2); if (is_field_on_space(40,41,2) == 0) put_field_on_space(40,41,2); if (is_field_on_space(41,41,2) == 0) put_field_on_space(41,41,2); if (is_field_on_space(42,41,2) == 0) put_field_on_space(42,41,2); if (is_field_on_space(43,41,2) == 0) put_field_on_space(43,41,2); if (is_field_on_space(38,42,2) == 0) put_field_on_space(38,42,2); if (is_field_on_space(39,42,2) == 0) put_field_on_space(39,42,2); if (is_field_on_space(40,42,2) == 0) put_field_on_space(40,42,2); if (is_field_on_space(41,42,2) == 0) put_field_on_space(41,42,2); if (is_field_on_space(42,42,2) == 0) put_field_on_space(42,42,2); if (is_field_on_space(43,42,2) == 0) put_field_on_space(43,42,2); if (is_field_on_space(39,43,2) == 0) put_field_on_space(39,43,2); if (is_field_on_space(40,43,2) == 0) put_field_on_space(40,43,2); if (is_field_on_space(41,43,2) == 0) put_field_on_space(41,43,2); if (is_field_on_space(42,43,2) == 0) put_field_on_space(42,43,2); break; I don't think it's to do with the terrain, floor, objects or characters present, as each turn, the spaces that aren't filled change. It's as if blades is adding in an "if random number is greater than" type of call. I'm happy to send you the entire (half built) scenario if that would help. Thanks Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted November 5, 2004 Share Posted November 5, 2004 Why not take out the "if" part of the calls? Putting a field on a space that already has a field does nothing harmful. It may just be a matter of when BoA reads the fields as disappearing: if it erases fields after the START_STATE, which I think it does, it would take an extra turn to add a new field. Getting rid of the "if" parts might fix this. Link to comment Share on other sites More sharing options...
Articulate Vlish demipomme Posted November 5, 2004 Author Share Posted November 5, 2004 I previously had it without the if statements then changed it because I thought adding a field to a field might be causing the problem. So basically the same problem occurs with or without the if statement. Thanks Link to comment Share on other sites More sharing options...
Chittering Clawbug Captain Obvious Posted November 5, 2004 Share Posted November 5, 2004 While crude and inefficient programming at best, you could try putting it in the.... i forget what state it is but the one that checks every turn. making it so that every turn, the field is created in that spot, as far as i know this would not have any negative effects unless the fields grouped, and instead of 1 quickfire, you were getting hit by 200. just a suggestion. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted November 5, 2004 Share Posted November 5, 2004 That's the START_STATE, and it's already there. Link to comment Share on other sites More sharing options...
Articulate Vlish demipomme Posted November 9, 2004 Author Share Posted November 9, 2004 Quote: Originally written by Captain Obvious:While crude and inefficient programming at best, you could try putting it in the [sTART_STATE]. Why's it crude and inefficient? If game is randomly removing fields after the START_STATE, is there some other call I could use to get the field created each turn? I though of using special encounters on every square in that area of the map, but what about if the party are in fight mode or they hit wait? Link to comment Share on other sites More sharing options...
Articulate Vlish demipomme Posted November 9, 2004 Author Share Posted November 9, 2004 Tried putting the same the same code in the START_STATE of a character script but the same problem applies. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Isaac Posted November 10, 2004 Share Posted November 10, 2004 Quote: Originally written by demipomme: Quote: Originally written by Captain Obvious:While crude and inefficient programming at best, you could try putting it in the [sTART_STATE]. Why's it crude and inefficient? Scripts are somewhat slow, so a long script that occurs every move (whether implemented with START_STATE or some other way) may slow the player down noticably. Quote: Originally written by demipomme:If game is randomly removing fields after the START_STATE, is there some other call I could use to get the field created each turn? No, but if you're just placing quickfire, I don't think it gets randomly removed, it just spreads, unless a script explicitly destroys it. It seems to me that placing the script in the INIT_STATE should work, if it's quickfire. However, looking at your script, I see that it places antimagic fields. You DEFINATELY do not need the ifs. I think the problem is that antimagic fields decay after the town's START_STATE happens. You might want to try putting it in the START_STATE of a terrain script that you place nearby (you may need to put Quote: Originally written by demipomme:I though of using special encounters on every square in that area of the map, but what about if the party are in fight mode or they hit wait? If you want it to happen every turn everywhere in the town, use START_STATE. Besides, there is a maximum of about 60 specials you can place in a town (it depends on town size; I think that's for large towns). If there was some good reason to have one everywhere, you could make new floor types so that every floor in the area has the special ability to trigger a special encounter. It would trigger for each character that move, even out of combat, and trigger even in combat, but not in either case if the party stands still. You do not want to try this here. Link to comment Share on other sites More sharing options...
Recommended Posts