Accname
2D-Graphics enthusiast
- Reaction score
- 1,462
as the title says, can i somehow turn an items raw code (for example pghe for greater healing potion) into an items ID (IDs are like 1227894832)?
i got plenty of items in one of my maps and to make it easier to test the game i want to create the items via triggers. the trigger looks somewhat like this:
the problem with this system is that the item IDs are very long and hard to memorize, however the item rawcode is much easier and it would be great if i could just enter the raw code instead of a 10 digit number.
thanks in advanced. accname.
i got plenty of items in one of my maps and to make it easier to test the game i want to create the items via triggers. the trigger looks somewhat like this:
Code:
Create Item
Events
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
Conditions
(Substring((Entered chat string), 1, 1)) Equal to -
Actions
Set TmpGrp = (Units currently selected by (Triggering player))
Set TmpPnt = (Position of (Random unit from TmpGrp))
Custom script: call CreateItemLoc( S2I([COLOR="Red"]SubStringBJ(GetEventPlayerChatString(), 2, StringLength(GetEventPlayerChatString()))[/COLOR]), udg_TmpPnt )
Custom script: call RemoveLocation (udg_TmpPnt)
Custom script: call DestroyGroup (udg_TmpGrp)
thanks in advanced. accname.