Is is possible to set new value to inventory properties by scripting?
I didnt find any commands like SetInvProperty.
No, you cannot set custom properties at run-time.
Depending on your needs, use variables or check out arrays and structs (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23527.msg247166#msg247166).
Thnx, but the problem is I need a value witch can be shared between roomscripts and the global script. I tried to use inventory property because there is only limited amount of global ints and that amount is a way too small for my purposes.
As strazer says, check out arrays and structs. If you declare a global array like this:
int inventoryproperty[AGS_MAX_INV_ITEMS];
You can import it in the script header, and do stuff like:
inventoryproperty[iShovel.ID] = 5;
or
if (inventoryproperty[iShovel.ID] == 5) player.Say("I have no idea why the property for the shovel needs to be 5, but it is!");
in room script.
Edit: I recommend you to work this out by yourself, since it will be a valuable lesson in scripting. But if you should need to change a large number of properties for different inventory items, objects or characters, you could also check out monkey's properties module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27385.0).
Also, Read the BFAQ (http://americangirlscouts.org/agswiki/Scripting%2C_Code_%26_Interaction#Working_with_variables:_the_basics) (Actually, making global variables is also covered in the link strazer gave you...)
You can make a pretty much unlimited number of your own variables (single ints or Strings, as well as arrays and structs), and make them accessable to Room and Global scripts.
I completely missed that import/export part ::)
but thnx, now it works.