Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Special event?  (Read 3755 times)

0 Members and 1 Guest are viewing this topic.

Rocco

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 87
    • View Profile
    • Virtual-Illusion
Special event?
« on: February 28, 2006, 04:24:31 PM »

i have an region entity, and in the script for this entity something like:
cup.script

Code: [Select]
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:

Code: [Select]
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?
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Special event?
« Reply #1 on: February 28, 2006, 04:48:48 PM »

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.  ;)
Logged
fl*p

Rocco

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 87
    • View Profile
    • Virtual-Illusion
Re: Special event?
« Reply #2 on: February 28, 2006, 09:10:14 PM »

its karneval today  ;D

AnyItem means not a specific one, but rather all items the player carry in this situation
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Special event?
« Reply #3 on: February 28, 2006, 09:46:03 PM »

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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Rocco

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 87
    • View Profile
    • Virtual-Illusion
Re: Special event?
« Reply #4 on: February 28, 2006, 09:58:06 PM »

thanks mnemonic, this works for me  ::rock
Logged
 

Page created in 0.215 seconds with 23 queries.