Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Pages: 1 [2]  All

Author Topic: 3 question in wme  (Read 8166 times)

0 Members and 1 Guest are viewing this topic.

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: 3 question in wme
« Reply #15 on: April 02, 2009, 08:44:13 PM »

I don't see anything wrong there.  Are you getting error messages in WME log file?  Or in scene log file?  You should always check for error messages and post them in the forum. 
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Ron_Emad2

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 32
    • View Profile
Re: 3 question in wme
« Reply #16 on: April 03, 2009, 11:48:55 AM »

No,I dont get any error
but when i take item ,it dont show in inventory item
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re: 3 question in wme
« Reply #17 on: April 03, 2009, 12:00:06 PM »

Does the TakeItem() line get called? Add some diagnostic messages like this:

Code: WME Script
  1. Game.Msg("Taking item");
  2. actor.TakeItem("anbor");
  3. Game.Msg("Taken: " + actor.HasItem("anbor"));
  4. Game.Msg("Whos inventory is displayed: " + Game.InventoryObject);
  5.  

What displays on screen when you do this?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Ron_Emad2

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 32
    • View Profile
Re: 3 question in wme
« Reply #18 on: April 03, 2009, 12:37:05 PM »

i test it
it work fine but
item dont apper(show)in inventory item
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re: 3 question in wme
« Reply #19 on: April 03, 2009, 12:41:09 PM »

So what output did you get? You should get something like:

Taking item
Taken: yes
Whos inventory is displayed: [actor]

If you still don't see the item, there's something wrong with your inventory box definition (i.e. the part of the user interface which displays inventory).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Ron_Emad2

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 32
    • View Profile
Re: 3 question in wme
« Reply #20 on: April 03, 2009, 12:57:43 PM »

i see this massege
takin item
taken : yes
whos inventory displayed:[gameobject]
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re: 3 question in wme
« Reply #21 on: April 03, 2009, 01:07:27 PM »

Ok, so either change it to Game.TakeItem() OR add the line

Game.InventoryObject = actor;

to your game.script (it is present in the code you posted above, I thought it was the code you were using...).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Ron_Emad2

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 32
    • View Profile
Re: 3 question in wme
« Reply #22 on: April 03, 2009, 01:35:52 PM »

oh, when i add this code (Game.InventoryObject = actor;)to my game it take item and it apper(show)in inventory item
yhanks
oh another question: i must use this code(Game.InventoryObject = actor;)in all item?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re: 3 question in wme
« Reply #23 on: April 03, 2009, 01:43:24 PM »

No, you only need to add it once (preferrably to game.script).

In WME, each object (game, actors, entities...) can have their own items. That's why you can use both:

Game.TakeItem("something");
  and
actor.TakeItem("something");

The Game.InventoryObject property then specifies, who's items are displayed on screen.
It's intended for games with several playable characters, to allow you switching between them.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Ron_Emad2

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 32
    • View Profile
Re: 3 question in wme
« Reply #24 on: April 03, 2009, 01:58:22 PM »

Thanks about your help
i work becuse i want build a professional game
i will come back ;D
Logged

Ron_Emad2

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 32
    • View Profile
Re: 3 question in wme
« Reply #25 on: April 04, 2009, 08:51:34 AM »

i cobe back with new question
i want use item on other item but actor say : i cant use these thinge together
but i done all worjk
i test my work in sample project of wme and it work fine and items combine
but in my project it dont work
please help me
with thanks
emad  :'(
Logged
Pages: 1 [2]  All
 

Page created in 0.24 seconds with 22 queries.