Hey, so I'm having a problem with scripting. Im trying to call for an item name and seeing if it matches another name in the evaluate condition function. However the line of code given by RPG in a box doesn't seem to be working? It gives me an invalid conditional expression error every time I attempt to compile the code.
if $item_name = item["ITEM_0001"].name then
This is the line of code I'm trying to run inside an evaluate condition function and it is not working at all.
if $item_name = item["ITEM_0001"].name then
attach_object("Iron Chestplate", player, "Armor");
end;
This is the full code.
I'm sure you can see what Im trying to do here. Im trying to see if the item name Im attempting to equip matches another Item name then attach this object.
Im trying to do it this way because I dont want to have to make a new unique script for every single piece of equipment.
So im trying to make one script that evaluates what the item thats being equipped's name is and then attach the appropriate object that matches .