Easygoing Eyebeast Thralni Posted February 24, 2006 Share Posted February 24, 2006 I have this call, with the appropriate variables and such: Code: place_monster(userx - 1,usery - 2,16,0); The game complains about it. What exactly is wrong here? Do I have to put the userx -1 and usery - 2 between brackets? Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted February 24, 2006 Share Posted February 24, 2006 Yes. You know, you could have checked that for yourself before posting here. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted February 24, 2006 Author Share Posted February 24, 2006 I could, if I would knew where to look. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast *i Posted February 24, 2006 Share Posted February 24, 2006 You mean parenthases. I don't understand by not knowing where to look. It seems simple, modify the code in ways you think should work, load up the scenario, activate the state in question, and see if it errors. You can even use the print_num() call to help with debugging. If you cannot figure anything out, then come to the boards. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted February 24, 2006 Author Share Posted February 24, 2006 You're right Stareye. that's what I should have done. Could anybody show an example of how to do it? I'm now completely confused between the terms parenthesis and bracket, so an example would indeed be useful. Thanks in advance. Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted February 24, 2006 Share Posted February 24, 2006 Parenthesis: ( Bracket: [ Curly brace: { Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted February 24, 2006 Author Share Posted February 24, 2006 Ah. Then my definiton of a bracket was wrong. Thanks. EDIT: Okay, this code doesn't do what I want it to do. I have absolutely no clue as to what may be the problem. The onlt thing I know, is there isn't a "Boom_on_char" and no "set_attitude(3)." Code: n = 90; char_ok(n);place_monster((userx - 1),(usery - 2),16,0);put_boom_on_char(n,5,0);set_attitude(n,3);run_animation_sound(61); Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted February 24, 2006 Share Posted February 24, 2006 So... you're trying to place a monser, put a teleport flash on it, and make the monster's attitude neutral, right? The call char_ok doesn't do anything — it's a pure short, a number. You can take that out. You only need to use it if you're checking that the character is alive. Do you know for certain that the character you're placing is going to be creature number 90? The only way that it will be is if 86-89 have already been placed, but 90 has not. This is almost invariably easier if you use a hidden monster and activate_hidden_group. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted February 24, 2006 Author Share Posted February 24, 2006 So what you say is, that if creature number 89 isn't placed in that town, then any creature that I want to be 90, will appear as 86, in that specific town, not as 90. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted February 24, 2006 Share Posted February 24, 2006 The first place_monster call will place creature number 86 if therer are no other summoned monsters in the town, yes. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted February 24, 2006 Author Share Posted February 24, 2006 Than that was probably the problem. thanks. Link to comment Share on other sites More sharing options...
Magnificent Ornk nikki. Posted February 24, 2006 Share Posted February 24, 2006 Quote: Originally written by Kelandon:This is almost invariably easier if you use a hidden monster and activate_hidden_group. Listen to Kel. Listen to him... Lis-ten... Really, this way is way easier, and you can still have the clever-looking flash before the creature appears. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted February 24, 2006 Author Share Posted February 24, 2006 No, sorry. I got it to work precisely as I want to work. The problem was with the definiton of the creature numbers, but it works now. I didn't know the numbers start at 86, and you can't just choose a random number. The groups are all nice and such, but no. I may be way easier, but it will cost me another two hours to get it all working. I'll have to start replacing creatures and such, until all creatures have the right number, in each town. I have 42 towns. Can you imagine the work? You see, this creatures are summoned by a sort of wand, a special item, which calls a state in the scenario script. Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted February 24, 2006 Share Posted February 24, 2006 What if someone summons monsters with a spell? Doesn't that affect the character numbers? Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted February 24, 2006 Author Share Posted February 24, 2006 Oh no, oh my god... I forgot about that... I will have to start changing it all again, I fear. *bangs his head aginst the wall* Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted February 24, 2006 Author Share Posted February 24, 2006 So... Fixed that last problem with summoned mosters. It wasn't such a drama anyway. I just let the game check if a certain mosters exists. However, what I didn't know: How many mosters are permitted in a town? (I'm so glad I don't have to start changing all towns by adding the with the item summoned monsters ) EDIT: Oh sorry, realized to late that this is a double post. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted February 25, 2006 Share Posted February 25, 2006 I refer you to the docs, section 2.8, under the heading How Characters Are Identified. Specifically, Quote: Each town can have at most 120 creatures active in it at any one time. They are referred to by numbers 0 to 119. Different ranges of numbers are used for different sorts of creatures: 0-3: The party. The player’s characters have numbers 0 to 3. 4,5: Added characters. You can use calls to have a character travel with the party. That character will be put in one of these two slots. You can only add two characters. 6-85: Placed town characters. You can place up to 80 characters in a town. When you select a character in a town, you will see the character’s number to the lower left. That is the number the character will have in the game. Those preset characters are the only characters that can ever be in these slots. If you place an ogre in slot 43, slot 43 will only ever contain that ogre. 86-119: Added creatures. These slots are for wandering monsters, summoned creatures, and creatures that split. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted February 25, 2006 Author Share Posted February 25, 2006 Ugh. I really neeed to learn to do it in the right order: Try looking it up yourself not found => boards Instead of the other way around. Anyway, thanks Kelandon. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Xoid Posted March 1, 2006 Share Posted March 1, 2006 @Thralni (Or anyone else interested in another way of achieving the same thing): If for some reason you absolutely do not want to use hidden groups, you could always use this instead: Code: place_monster((userx - 1),(usery - 2),16,0);n = char_on_spot(userx - 1,usery - 2);put_boom_on_char(n,5,0);set_attitude(n,3);run_animation_sound(61); Ideally, you would check to make sure that "userx - 1,usery - 2" is empty first. I'll leave that as an exercise for other people to play with. 'Cause I couldn't be bothered right now. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted March 1, 2006 Author Share Posted March 1, 2006 That is exactly the thing I made abouty a week ago, with automatical checks for amount of monsters, and possible terrain/monsters that may obscure the spot to summon the monster. Thanks for the advice, but I already made something that works perfectly, and is almost the same as you made. No, I'm not a complete beginner at scripting Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted March 1, 2006 Share Posted March 1, 2006 EDIT: Eh, never mind. Link to comment Share on other sites More sharing options...
Recommended Posts