Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Execute command by clicking an inventory item  (Read 3093 times)

0 Members and 1 Guest are viewing this topic.

Purpur

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Execute command by clicking an inventory item
« on: December 19, 2013, 02:56:35 AM »

Hi there!

I have one question.
In one of our puzzles, the actor is supposed to play an animation right after the player clicks on a specified inventory item.

But as far as i know, the only script regarding the inventory items is the "items.items" script and i don't see any possibilities to manage these.

So, is there a way to run a script which says something like: if you click on this item, then do this and that?
It's not that important if it has to be a left- or a right click. Main thing is, i want to somehow interact with this single inventory item.

I really hope someone got an idea. Thanks in advance! :)
« Last Edit: December 19, 2013, 02:58:16 AM by Purpur »
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Execute command by clicking an inventory item
« Reply #1 on: December 19, 2013, 08:34:42 AM »

Of course it's possible. Simply implement a custom event for that item and call it from LeftClick in Game.script.

If you post your on "LeftClick" handler and script attached to the item in question I can help more.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Purpur

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Re: Execute command by clicking an inventory item
« Reply #2 on: December 27, 2013, 06:43:32 PM »

Sorry for my late response.
But thank you very much, we got it! :)

PS: I wish you a happy new year.
Logged
 

Page created in 0.021 seconds with 23 queries.