Taking Away Item Help

So, I have an overpowered sabotage in my game that’s supposed to get rid of EVERYTHING in their inventory, but I don’t know how.

For everything you can obtain in game make an item granter set all of these to grant -1000 of each and make them receive on LoseInventory. When the player uses the power up wire it to a Relay that broadcasts to all other players on the channel LoseInventory.

If you have any questions about this just mention me.

Edit - i think I misunderstood you do you just want one specific player to lose their inventory?

1 Like

yeah. but just a random person. also, i need something to track everyone’s item count because if i just go with 1000, it’s possible someone doesn’t have 1000 of something and they actually gain the amount of items that they couldn’t take away

if that was confusing

if player’s inventory items is less than the amount taken away, then the game will give the player the amount they couldn’t “pay”

Ok. That complicates things. Let me get a prototype but you can use a relay to random person and then check to see if its not the person triggering for the first part. But the other part might take a lot of memory and IIM’s

1 Like

ok. just note that i have other iims so i don’t want those iims to interfere with the other ones

Yeah these wont have limits, they are just to create properties

ok

So you are going to have an IIM and relative player scoped property for each item you can collect in-game. When the player is selected through the random relay it will broadcast on Start Lose Inventory.

Just fyi I haven’t actually made this since i cant get to my computer but I am just brainstorming.

Option 1

You will need one checker and one item granter for each item/IIM setup. The checker will run its check on Start Lose Inventory if the property it is checking is above zero it will activate the item granter which will grant -1 of that item. Once granted it will run the check again.

Pros

  • slowly watch items disappear
  • less memory

Cons

  • smart players could drop items and then retrieve them to avoid drain
  • more devices
Option 2

You will have one item granter for each item/IIM setup. In block when recieving on Start Lose Inventory it will grant -1 * of the items property that it is associated with.

Pros

  • removes all items right away
  • less devices

Cons

  • more memory due to block code
1 Like

ok i’ll test that now

Did it work?

yup but i might want a memory-efficient one so i’ll leave this one open for a day to see if anyone else has another way to do it (i have used 72% memory so yeah)

Or just use an IIM for each item that you can receive and just use the clear inventory option.

hang on. i have to check my map if i need to make the upgrade check if a player has bought an inventory upgrade

You don’t need a check. You can still clear it.

oh ok then

@TorontoBulls1 fyi gimsolver found a memory-efficient way to make this work so…

1 Like

If they don’t have the item, nothing will happen. Also, just use the clear inventory option, it goes on a channel and is easier and more memory-effiecient than blockcode.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.