Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Rocco on February 28, 2006, 04:24:31 PM
-
i have an region entity, and in the script for this entity something like:
cup.script
on "Use"
{
phantom.Talk("/ROOM1030/Der ist schon ganz verstaubt, ich lass ihn lieber da stehen.");
}
on "LookAt"
{
phantom.Talk("/ROOM1031/Ein Reservebecher, falls ich Besuch bekomme.");
}
this is a 'blind' entity - has no relevance for the game.
if i try to combine an item with this, i have a standard comment like - "cannot combine these items"
but i want an standard message only for this special entity for the player trying to combine an item with this entity.
like:
on "Use"
{
phantom.Talk("/ROOM1030/Der ist schon ganz verstaubt, ich lass ihn lieber da stehen.");
}
on "LookAt"
{
phantom.Talk("/ROOM1031/Ein Reservebecher, falls ich Besuch bekomme.");
}
on "AnyItem"
{
phantom.Talk("/ROOM1033/This cup is empty and cannot carry this item
}
what can i do here?
-
Actually you got it accidentaly right ;D
If the "NAME" for the object in the items.items file is "AnyItem" then your example is valid. ;)
-
its karneval today ;D
AnyItem means not a specific one, but rather all items the player carry in this situation
-
If you are using the default scripts from WME demo/templates, you can use the "default-use" event handler for this purpose. The default game.script uses this event whenever the object cannot handle a specific item.
-
thanks mnemonic, this works for me ::rock