![]() |
![]() ![]() ![]() ![]() ![]()
|
Author | Topic: slight typo and quick question |
babydragon |
![]() found a minor typo in the help file that might cause confusion. Under the text formatting section it says that |xb turns off underlining but this is not so, doesn't take a genius to figure out the correct method is |xu, but I thought alex might want to know about it anyway. And now a quick question: is there a good way to remove all objects from the inventory? Thanx!! |
babydragon |
![]() Well, I figured out a way to remove all the items from the inventory (it works) but it seems really sloppy. I had it repeat a script for every item in the inventory and the script has a list of ALL the items in the game. Seems like the long way to do it, but it works. If you guys have a better Idea I'd love to hear it! Thanx! |
MaDbRiT |
![]() Just a suggestion, Use a loop..
quote: In the above I move all the objects to a room called "limbo" - you can do whatever you like instead :-) Al |
babydragon |
![]() uh, I don't quite get it. Is "#quest.thing#" something I need to create/define first or is it a reference to all objects? |
Computer Whizz |
![]() #quest.thing# is a variable given out by "for every/each object in...". It means that you get a variable for that object, use it, then move on to the next object! Computer Whizz |
babydragon |
![]() Ah, yes, that works nicely! Thanx! |
Alex |
![]() It shouldn't work nicely - I'm quite sure "inventory" needs to be in a parameter i.e. for each object in <inventory> { |
carlii |
![]() L0L |
MaDbRiT |
![]() quote: Uhm... Alex I use it in a function WITHOUT the parameter brackets in my q3ext.qlb library and it works.. put them IN and it doesn't. Might be a coding fluke where something else is happening to what I THINK is happening, but I assure you the code I posted seems to work just fine! Al |
Alex |
![]() Hmmm, I've just investigated, and when I try it, I need the parameter! It doesn't work at all without it. Peculiar. |
MaDbRiT |
![]() Hi Alex Try the demo of the latest library I sent you. In the lib at line 714 I use the parameterless 'inventory' to check the objects in the inventory. If you try looking at an inventory item (say take the large red box), the code finds the box if you use "look at large box", so that suggests the code works. Wierd. Al |
Mega |
![]() After you remove all the items from inventory, will they be gone for good, or will you be able to get them back later? If they're gone for good, I would simply hide them, like this: for each object in inventory { That way, if later you should need to do a "for each item in game" routine, the hidden items won't be affected. |