Edited by DigitalDetective47, 25 May 2024 - 07:10 PM.
3 replies to this topic
#1
Posted 25 May 2024 - 06:27 PM
Is there any way for an item script to access information about the item that called it?
#2
Posted 26 May 2024 - 12:10 PM
this->ID
#3
Posted 28 May 2024 - 12:04 AM
There was no such parameter in 2.53. Use this function in 2.53.
//Returns ID of item from itemdata pointer int ItemID (itemdata it){ for (int i=0; i<256; i++){ itemdata n = Game->LoadItemData(i); if (it==n) return i; } return -1; }
#4
Posted 28 May 2024 - 10:41 AM
There was no such parameter in 2.53. Use this function in 2.53.
//Returns ID of item from itemdata pointer int ItemID (itemdata it){ for (int i=0; i<256; i++){ itemdata n = Game->LoadItemData(i); if (it==n) return i; } return -1; }
You don't need `this->ID` though to get the *information of the item*, only the ID number. If what they want is actually just information about the item, `this->` in general has all of it (since `this->` is already the itemdata for the item)
Also tagged with one or more of these keywords: item
Zelda Classic →
Scripting Discussion →
Script Requests →
Fire and Ice Arrows 2.55Started by Blackpaintbowser , 28 Aug 2022 arrows, item, 2.55 |
|
|
||
Zelda Classic →
ZC Development →
ZC Bug Reports →
[2.55] Problems with the WhistleStarted by Korben , 27 May 2021 [New], [Item] |
|
|
||
Zelda Classic →
ZQuest Editor Help →
Item/Enemy Sprite EditorStarted by Riflezen , 23 Sep 2019 NPC, Item |
|
|
||
|
Alpha
Zelda Classic →
ZC Development →
Zelda Classic 2.55 Alpha 17 (Official)Started by Timelord , 09 Apr 2019 Alpha, Æternal, AEternal, 2.55 and 4 more... |
|
|
|
Zelda Classic →
Scripting Discussion →
Script Requests →
Magic ArrowStarted by Aefre , 07 Jul 2018 Item |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users