Keith | I know I posted a similar topic, but I desperately need to know how to create inventory items. The template game has you implementing a radio. I understand how to do that. But I'm having difficulty adding another item. I read the defines.txt and it said something about changing num_inventories(?). And what's v255? For the source code I've written read my previous topic. Thanks. Please help! |
Robin_Gravel |
V25 is used for inventory. V255 is used for something else. Robin Gravel |
Keith |
OK. But how come when I use another variable (v254) for a different object and make it equal to 2 the object doesn't appear. But if I make it equal to 3 the object appears? And when I type gimme gimme, one of the objects does not appear in my inventory? I hope I'm making sense. Thanks. |
Robin_Gravel |
There's a problem with the template specialy "gimme gimme" thing. Change v255=0 to v255=1. It should work. Robin Gravel |
Keith |
I think I have found a solution. Please tell me if it is accurate: I didn't include any v255 thing and, instead, set the v to 0. For example: animate.obj(rose); load.view(3); set.view(rose,3); set.loop(rose,0); set.cel(rose,0); position(rose,58,125); set.priority(rose,11); ignore.objs(rose); stop.cycling(rose); if (obj.in.room("rose",v0)) { draw(rose); } animate.obj(candy); load.view(4); set.view(candy,4); set.loop(candy,0); set.cel(candy,0); position(candy,60,150); set.priority(candy,11); ignore.objs(candy); stop.cycling(candy); if (obj.in.room("candy box",v0)) { draw(candy); } It works, but is it buggy? Thanks Robin for helping. |
CapTAmerik@ |
I remember this problem. I too have problems having a 'puppet' appear in my inventory. To me, changing v255 would be strange, because the other inventory-objects (money, a pass, a key) DO appear in the inventory screen. I've put the puppet in the object-editor and addressed views to it. I made the necessary logic. Even updated the number of objects in defines.txt. But still object nr. 5 won't show up. It won't even get me the object in debug mode with 'get object', let alone 'gimme gimme'. "Object 5 does not exist" or something similar. I'm sure I'll figure it out eventually, though, :-). I like puzzling to make the script work... (although sometimes very tiring.. :P) CaptAmerik@ |
AGI1122 | You have to open up defines.txt and change the number of inventory objects in the game to the ammount that you have. Then compile logic 99, 0, and 91 and it should fix the gimme gimme thing, and the get object thing as well. |
Joel | No, using v0 should not be buggy. However, I'd suggest using its define name so that it's clear why you're using it. v0 is the reserved variable called "room_no". |