Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Combine two items in inventory  (Read 3447 times)

0 Members and 1 Guest are viewing this topic.

samad.sattary

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
    • View Profile
Combine two items in inventory
« on: March 28, 2012, 07:42:03 AM »

hello
how can Combine two items in inventory ?

Please help me
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: Combine two items in inventory
« Reply #1 on: March 28, 2012, 12:40:02 PM »

Providing you have two items (hammer and nails) and you want to combine them to create an item HammerWithNails, you'll do the following:


hammer.script
Code: WME Script
  1.  
  2. on "nails"
  3. {
  4.                 Game.SelectedItem = null;
  5.                 Game.TakeItem("HammerAndNails");        
  6.                 Game.DropItem("nails");
  7.                 Game.DropItem("hammer");
  8. }
  9.  
  10.  

nails.script
Code: WME Script
  1.  
  2. on "hammer"
  3. {
  4.                 Game.SelectedItem = null;
  5.                 Game.TakeItem("HammerAndNails");        
  6.                 Game.DropItem("hammer");
  7.                 Game.DropItem("nails");
  8. }
  9.  
  10.  


Note, that you always have to drop the item you did click on with another item selected the last.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

samad.sattary

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
    • View Profile
Re: Combine two items in inventory
« Reply #2 on: March 28, 2012, 01:32:42 PM »

Should I create a new script?
Where should I make this script?
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: Combine two items in inventory
« Reply #3 on: March 28, 2012, 07:02:27 PM »

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

samad.sattary

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
    • View Profile
Re: Combine two items in inventory
« Reply #4 on: March 29, 2012, 10:28:30 AM »

Thank you
 ;)
Logged
 

Page created in 0.071 seconds with 21 queries.