|
Axe Software Forums
Quest Developer Forum I have another question
|
Author | Topic: I have another question |
Adji |
posted 06-01-2003 21:32 GMT
I know i am frequently asking questions, but all of your help is really appreciated. How can i make it, without using ASL, so that one object, in my case a character, will follow you, allways appear in descriptions, and basically be in the same room you are in all of the time? without creating seperate ones? If this is not possible then please tell me howto do it in easy to understand ASL. Thankyou |
Alex |
posted 06-01-2003 23:28 GMT
Probably the easiest way is to go to Game Properties, Script, After turn script. Go to add a command, then go to the Objects category and select "Move an object to another location". Select the object you want to move, then in the "To room" box, type: #quest.currentroom# Then, every turn, the object you specified will be moved to the same room as the player. |
Adji |
posted 07-01-2003 14:22 GMT
Thans, but there is still one problem. The player meets a charactor after entering a few rooms, using the game properties window will make the charatcer have the object from the beginning of the game yes? Well i want him to have the object only after he has been to a certain place, how do i do this? |
Computer Whizz |
posted 08-01-2003 05:00 GMT
Right: The best way to do it shortens the code a bit (just guessing since I haven't tryed putting it down)but isn't idea for alot of objects or a large game... There is one problem with ALL ways to do this, and that is whenever you kill off or use (if it's usable) the object following you - if you go back to the room then it will again start to follow you. That should work if you can put that idea into code... Computer Whizz |
MaDbRiT |
posted 08-01-2003 13:10 GMT
Hi
The follower here is a pet cat - which once spoken to will follow the player around, but until spoken to will not. This serves as a "how to do it" example for enabling a follower. quote: Cut n paste this saving it as 'follow.asl' and open it in Quest / QDK to see how it is done. This is dead simple and needs a lot of refining but ought to point you in the right direction. Al |
passerby |
posted 12-01-2003 16:35 GMT
There's another way that might work for you, and it's dead easy. Simply give the object to the player, rather than the room, and write descriptions that say it is following. A simple example can be found in the game 'Spectrum' in the quest archive, vis a vis the 'takeable cat' object. If the character has to do something, you can put that in an 'afterturn' script. This way, adding the character and getting rid of it are easy, because there is only one object used for all locations. |
Adji |
posted 12-01-2003 17:46 GMT
I like the way you think! There is one problem tough, the charactor does not BELONG to the player it BELONGS to the room you are in. Thanks ComputorWhizz and MADBRIT |
MaDbRiT |
posted 12-01-2003 22:01 GMT
Passerby suggested:
quote: That works from the 'have the object following' point of view, but Adji asked for a way to have the object showing in the room description (i.e. objects/places list). If you put the follower in the inventory - it won't show in the room! Al |
Adji |
posted 13-01-2003 16:59 GMT
quote: My point exactly, but thanks for at least trying. |
passerby |
posted 14-01-2003 09:50 GMT
Sorry. it looked good at the time. It might not be completely useless though, you could add a little section in 'afterturn' that moved a second object into the room if the player has the first object. They would probably need different names, though. So you'd have to compare this with the other way of doing it, and see which is easier for exactly the things you want to do. Remember it anyway, it might turn out to be just what you need for some other problem later on. |
MaDbRiT |
posted 14-01-2003 16:55 GMT
Passerby wrote quote: It's another approach to the problem - it doesn't QUITE do what is asked for, that's all.
quote: There are almost always plenty of ways to create the same visible effect to the player - that's what makes coding such fun! (for me anyway) The demo code I posted was the 'obvious' way to do what's required and does do exactly what Adji asked for. Although it is presented here in ASL form it was actually done in QDK and requires no knowledge of ASL to make it work. I can think of about five other ways to do this "off the top of my head" so to speak, and although some are rather more elegant solutions, none are as easy to do. Al
|
New Creator |
posted 14-01-2003 19:22 GMT
The way I would do it is to give the object to the player, then write in the Game properties, Print description script: If player has "cat" then print:The cat follows you into #quest.currentroom#. I checked and it works. Hope it helps! |
MaDbRiT |
posted 15-01-2003 10:59 GMT
quote: That works for describing the cat as a following the player - but it doesn't leave the cat object listed in the room objects nor is the cat mentioned if the player types "LOOK" - which it should be if it is present. Try my example from above and you'll see what I mean. It's interesting to see how different people approach the same problem though and I hope this kind of 'discussion' of how to do things will stimulate further exchanges - it is good for everyone. Al |