Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Multiple copies of same item possible?

13 years ago

I've just discovered this site recently, and I've jumped right into working on a CYS version of a forum game I did a while back. It's tricky, cos I'm learning how to do stuff as I'm going along. Anyhoo, I want to have an item (say a map or gun-clip) that's available in more than one location. Essentially each 'item' would just be an 'incidence' or clone of an object rather than an entirely separate object.

I can't see any way this is possible, though. Do I really need to make, say, 10 copies of the exact same item?

Also, if the above is possible, how could it be done so that only one 'incidence' of an object can be in the inventory at once? After all, you only need one map.

With something like gun-clips, is it possible to have one icon in the inventory but with a number showing how many clips you have?

Thanks

Multiple copies of same item possible?

13 years ago

 

I know that you can link picking up one item with dropping another, so you could have the same item in multiple location, that when picked up, wouldn't double up your items. Also, you can use scripting to not show an item at all if the player already has it - like a map for example. Once it is picked up, it won't show up again later.
 
You'll have to wait until someone experienced with using items replies though to explain how. I haven't tried to use any items in my games yet.

 

Multiple copies of same item possible?

13 years ago

That first suggestion might work. Maybe I could also include a $PAGETEXT command, linking to the same page, to show a message like "The item you're trying to pick up is identical to one you already have. You can only carry one unit of this item". It would be best - for realism - for all instances of the item to be visible and clickable.

Re dropping; Do items 'spawn' back at their original location when dropped...? I think I read that somewhere. Is there any way to drop items to the page you're on? Or make them disappear altogether?

Maybe toggle-variables or something...

 

Thanks for the reply, BerkaZerka.

Multiple copies of same item possible?

13 years ago

You might want to PM SindriV with these questions, as he's pretty good with mixing items into his games.