Author Topic: Loot system Help  (Read 628 times)

I am using an onItemPickup event for a loot system that I am making, where every morning new loot spawns on a brick, and I need it so when you pick up  the item, it disappears. The problem is, the onItemPickup event doesn't work with an ammo system, EX I am using Gcat's default weaponry. It has an ammo pickup system. I thought maybe deleting a certain part in the ammo script would fix it. It half fixed it. The event worked, but you fire one shot and the gun runs out of ammo and you need to reload. If someone could either fix the item pickup event, or edit Gcat's to work without the ammo box, it will be appreciated.

« Last Edit: January 05, 2014, 11:42:31 PM by Damien4545 »


.
Best reply 2014

Use onActivate > Player > spawnItem | onActivate > Self > setRaycasting [false]

Best reply 2014

Use onActivate > Player > spawnItem | onActivate > Self > setRaycasting [false]
The loot spawns every morning, it's not a loot box. The items actually appear on a set block, but the onItemPickup event doesn't work.

The loot spawns every morning, it's not a loot box. The items actually appear on a set block, but the onItemPickup event doesn't work.
I wrote that with the idea that you'd have to change it.
You could just use onPlayerTouch - also is this for Hunger Games?

I wrote that with the idea that you'd have to change it.
You could just use onPlayerTouch - also is this for Hunger Games?
No, I am using it for a remake of a project I started while ago; Zomblockalypse. It's gameplay sort of works like that of DayZ, exept in Blockland. Of course, it isn't going to be perfect, I am changing it into a more blocklandish thing.

The problem with the OnPlayerTouch is that I am using an addon where you have to click to pickup items, and the author didn't add an event for when you click on it. So one addon crosses another, and it messes the whole thing up. ( The click - to - pick addon works with the onItemPickup, it's just onItemPickup doesn't work with ammo systems

Kind of in a pickle here

No, I am using it for a remake of a project I started while ago; Zomblockalypse. It's gameplay sort of works like that of DayZ, exept in Blockland. Of course, it isn't going to be perfect, I am changing it into a more blocklandish thing.

The problem with the OnPlayerTouch is that I am using an addon where you have to click to pickup items, and the author didn't add an event for when you click on it. So one addon crosses another, and it messes the whole thing up. ( The click - to - pick addon works with the onItemPickup, it's just onItemPickup doesn't work with ammo systems

Kind of in a pickle here
Disable the click-pickup thing? You could also check if T+T supports onItemPickup. Chances are there isn't an easy way out - you'll probably have to compromise something.

Disable the click-pickup thing? You could also check if T+T supports onItemPickup. Chances are there isn't an easy way out - you'll probably have to compromise something.
I am working on a small weapon pack, and want to see if it will work with onItemPickup. It works by default, but I want a reloading system implemented into them, and I am not quite sure how to do that.

I am working on a small weapon pack, and want to see if it will work with onItemPickup. It works by default, but I want a reloading system implemented into them, and I am not quite sure how to do that.
IMO ammo is kind of annoying, you can always just have the reload be a few seconds of not-being-able-to-fire and infinite ammo.

IMO ammo is kind of annoying, you can always just have the reload be a few seconds of not-being-able-to-fire and infinite ammo.
That's kind of what I was thinking. I use a base gun script, and I change the variables around to my liking. I can model better than I can code, so I have no idea how to
  just have the reload be a few seconds of not-being-able-to-fire and infinite ammo.
« Last Edit: January 06, 2014, 09:43:33 PM by Damien4545 »

The only way I know how to fix this is have the item disappear after you touch the brick the item is on, except there would be a delay before the item disappears so you can actually pick it up. Something along those lines.