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: [Q] How to use an item?  (Read 3232 times)

0 Members and 1 Guest are viewing this topic.

MyShroom

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
    • View Profile
[Q] How to use an item?
« on: July 09, 2010, 10:51:05 PM »

My actor just get an item Horse.
I need to use it on stand alone  entity that i was created with oldguy template:

data/scenes/Home/scr/scene_init.script
Code: [Select]
// load the hook entity
global Hook = Scene.LoadEntity("entities\hook\hook.entity");
Hook.SkipTo(525, 388);

I find a similar situation in demo when molly suggest her money to oldguy, and chenged code for my situation

data/entities/hook/hook.script
Code: [Select]
on "Horse"
{
  Game.Interactive = false;
  actor.Talk("Take it!");
  Game.Interactive = true;
}


But it doesnt work. wiadw?
Thanks.
« Last Edit: July 10, 2010, 07:59:44 AM by MyShroom »
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: [Q] How to use an item?
« Reply #1 on: July 10, 2010, 01:24:46 AM »

if the item is indeed "A", the suggested block would read

on "A"
{

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

MyShroom

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
    • View Profile
Re: [Q] How to use an item?
« Reply #2 on: July 10, 2010, 07:54:07 AM »

Yeah, I changed oldguy's code for my situation.
Edited first post.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: [Q] How to use an item?
« Reply #3 on: July 10, 2010, 08:03:28 AM »

It should work. Make sure your hook.entity is actually referencing the hook.script file (perhaps it's still referencing oldguy.script inside?).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.059 seconds with 20 queries.