Jump to content

Photo

Adding or Removing items from links inventory

question items inventory link

  • Please log in to reply
3 replies to this topic

#1 SparksTheUnicorn

SparksTheUnicorn

    Lonk, Hero of Lime

  • Members

Posted 09 June 2020 - 04:11 PM

Is there any way to, or any functions that exist that, allow me to have the game remove or add an item to links inventory when called?



#2 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 09 June 2020 - 04:13 PM

Link->Item[WhateverItemNumber] = false;

 

That'll remove an item. Setting to true will give the item.


  • SparksTheUnicorn likes this

#3 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 09 June 2020 - 07:40 PM

Doing it this way will *not* run any pickup script for the item though, nor will it do the pickup things configured in the item editor, afaik. If you want those things to run you need to create the item at the position Link is currently at (as well as make sure he has collision with items).



#4 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 25 July 2020 - 10:31 AM

I suppose that I can ad a variation of itemdata->RunScript that runs one of its script types (active, collect, sprite), to solve that problem.


  • Emily likes this



Also tagged with one or more of these keywords: question, items, inventory, link

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users