Hiding an item in a player's inventory

Post » Mon Mar 14, 2011 2:25 pm

Is there a way to force an item to remain in a player's inventory if they try to drop or move it to a container? I have a script controlling how and when the item is used, but can't stop the player from removing the item from their inventory.


Add 1: If I tick the item as a quest object it can't be removed, but then the script won't add additional copies of the item as intended and the actual item count is 0 instead of 1+
User avatar
Rozlyn Robinson
 
Posts: 3528
Joined: Wed Jun 21, 2006 1:25 am

Post » Mon Mar 14, 2011 3:21 pm

Add 1: If I tick the item as a quest object it can't be removed, but then the script won't add additional copies of the item as intended and the actual item count is 0 instead of 1+

Yes, but a script can remove a quest item from the players inventory...perhaps removing all before adding back a higher quantity. I've never ran into where you can't have multiples of the same quest item. The metal ingots you collect in DLCPitt are quest items, so I wonder why it's not an issue in that case.
User avatar
Sanctum
 
Posts: 3524
Joined: Sun Aug 20, 2006 8:29 am

Post » Mon Mar 14, 2011 11:33 pm

Ok I'll reveal my secret evil plans. ;)

What I was going to do was make a weapon charge up its own ammunition over time. That part's working well until I make the ammo a quest item. The weapon then stores the ammunition in the player's inventory but won't use it in the weapon. So the weapon's magazine looks like "0/8" (8 being the maximum number of ammo my script will accumulate until it stops producing.)

If I don't have it as a quest item the weapon will charge up "8/0" which is what I want, but then the player can remove the ammo and stockpile it in a container, because the weapon will start making ammo again if it detects less than 8 ammo on the player.
User avatar
Laura Mclean
 
Posts: 3471
Joined: Mon Oct 30, 2006 12:15 pm

Post » Mon Mar 14, 2011 1:30 pm

Yeah, I done that already.
http://www.gamesas.com/index.php?/topic/1037421-wip-the-solar-scorcher/

When the original Solar Scorcher model is done, the mod will be mostly done.
I figured if the player wants to cheat, there is going to be no way to stop them anyway. :blink:

My current script should work on NPC's as well as the player.
It recharges quick, but only during the daytime, and only outside. About every 13 minutes of in-game time, you get one charge, and only up to a max of 100.

And you can't put a script on ammo, so I am not sure if there is anything you can do about it.
User avatar
Abi Emily
 
Posts: 3435
Joined: Wed Aug 09, 2006 7:59 am

Post » Mon Mar 14, 2011 5:59 pm

What about making the ammo unplayable? They SHOULD still be able to use it, but it won't show up in their inventory. I haven't tested this though, so it may not work as expected.
User avatar
Janette Segura
 
Posts: 3512
Joined: Wed Aug 22, 2007 12:36 am

Post » Tue Mar 15, 2011 4:10 am

I'm not sure if this is relevant, but Cube Experimental did something sorta like this I think. They have a flamethrower, and when you use it, it says you have 0/0 ammo. But you can still use it almost indefinitly. I think they hid the ammo, then kept adding some to you as you use it. But it was hidden so it never said you had any ever. It was weird, and I'm not sure how they did it.
User avatar
jessica Villacis
 
Posts: 3385
Joined: Tue Jan 23, 2007 2:03 pm

Post » Tue Mar 15, 2011 2:52 am

I'm not sure if this is relevant, but Cube Experimental did something sorta like this I think. They have a flamethrower, and when you use it, it says you have 0/0 ammo. But you can still use it almost indefinitly. I think they hid the ammo, then kept adding some to you as you use it. But it was hidden so it never said you had any ever. It was weird, and I'm not sure how they did it.

You sure they didn't just set it to use no ammo? 'cause that will read 0/0 and never run out.
User avatar
El Khatiri
 
Posts: 3568
Joined: Sat Sep 01, 2007 2:43 am


Return to Fallout 3