Set variable script question

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Mefisno
Slime
Posts: 14
Joined: Wed Jun 06, 2018 8:48 am

Set variable script question

Post by Mefisno »

Hopefully a simple question but when I am trying to set an item as a variable in a script can I use its number rather than name?

for example I want the script to check what item a hero has equipped so I have a variable set
set variable (Equipment,item:Ichor)
this works fine with the item name but not as the number of the item in the engine.
This is ok but I have some items which use symbols in the name which I can't type into the script.

Is there a way I can use something simmilar to... set variable (Equipment,item:191)
and the exact same question for spells as well.

Thanks in advance.
User avatar
Mogri
Super Slime
Posts: 4668
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Item: name is a shorthand for the item ID. You can use the item ID directly. Don't use item:123, just use 123.
User avatar
Mefisno
Slime
Posts: 14
Joined: Wed Jun 06, 2018 8:48 am

Post by Mefisno »

That has solved all my problems.

Cheers!
Post Reply