Code Help
Author | Topic: Code Help |
---|---|
Infiltrator
Member # 148
|
written Saturday, December 15 2007 22:33
Profile
How do I put an item IN a container? I can put the item on a spot, but not in the container according to the docs. -------------------- My ego is bigger than yours. Posts: 480 | Registered: Thursday, October 11 2001 07:00 |
Shock Trooper
Member # 7662
|
written Saturday, December 15 2007 22:47
Profile
If you are referring to void put_item_on_spot(short loc_x,short loc_y,short what_item) there is no call that makes an item contained or otherwise. You can manually make an item contained by choosing Shift + S, clicking on the square containing the item and then clicking on the line that says "Not Contained". Posts: 292 | Registered: Monday, November 13 2006 08:00 |
...b10010b...
Member # 869
|
written Sunday, December 16 2007 05:16
Profile
Homepage
One option is to fake it by using a call to give the party the item when the container is searched, rather than actually placing the item. -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Lifecrafter
Member # 6193
|
written Sunday, December 16 2007 07:32
Profile
Homepage
Oddly, if you put an object on a container it WILL be contained-- or at least half contained. The player will have to search the container to get the item, but the item will appear on top of the container. Personally I prefer a twist on what Thuryl is talking about. Place the object in a container but have a block_entry() called whenever the player searches until whatever conditions are met so that the player can find the item. Alternatively, hidden containers containing items (with a block_entry()) toggled to visible containers (without a block_entry()) can be useful as well if the space wasn't originally a container. -------------------- "NOW PASS ME MY BOOTS. I HAVE AN APPOINTMENT WITH A FACE." -Nikki Frostbite: Get It While It's...... Hot? Posts: 900 | Registered: Monday, August 8 2005 07:00 |
Law Bringer
Member # 4153
|
written Sunday, December 16 2007 11:05
Profile
Homepage
block_entry() works on containers? Sweet... -------------------- TM: "I want BoA to grow. Evolve where the food ladder has rungs to be reached." Gamble with Gaea, and she eats your dice. Posts: 4130 | Registered: Friday, March 26 2004 08:00 |
Shock Trooper
Member # 10488
|
written Sunday, December 16 2007 11:15
Profile
I think you'd want to put it in the SEARCH_STATE to prevent access to the contents of the container. Posts: 334 | Registered: Friday, September 14 2007 07:00 |
Shock Trooper
Member # 7662
|
written Sunday, December 16 2007 13:41
Profile
A customized terrain script would prevent access until the conditions were met. Presumably the condition would be represented by a certain SDF. If the conditions were represented by a special item you could use the existing trap.txt instead. Posts: 292 | Registered: Monday, November 13 2006 08:00 |
Lifecrafter
Member # 6193
|
written Sunday, December 16 2007 14:06
Profile
Homepage
Or just specobj with a flag/item/whatever check in the state it calls. -------------------- "NOW PASS ME MY BOOTS. I HAVE AN APPOINTMENT WITH A FACE." -Nikki Frostbite: Get It While It's...... Hot? Posts: 900 | Registered: Monday, August 8 2005 07:00 |
Shaper
Member # 3442
|
written Monday, December 17 2007 05:25
Profile
Homepage
quote:That's the way I do it, and it's so damn easy. Place a specobj terrain script on a container, set memory cell 0 to 10 (or whatever), and then add this in the town script: [ Monday, December 17, 2007 05:26: Message edited by: Funkadelic ] -------------------- Nikki's Nook - bigger than Jesus? Posts: 2864 | Registered: Monday, September 8 2003 07:00 |