Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Yakuzza on September 16, 2012, 01:20:06 PM

Title: Invenotry item doesnt work
Post by: Yakuzza on September 16, 2012, 01:20:06 PM
Hi guys!
I'm fairly new to the engine and i'm loving it so far. But i ran in to a problem using an inventory item on entity.
Every time i click on the region with my inventory item selected actor performs regular on "LeftClick" events.
Debug window shows no errors though.
I would really appriciate the help!
Here's the script
Code: [Select]
#include "scripts\base.inc"

on "LeftClick"
{

actor.GoTo(996, 412);
actor.TurnTo(DI_RIGHT);
actor.Talk("There could be something interesting on the other side.");
actor.Talk("If only i had something to help me to cross that gap...");

}

on "LeftDoubleClick"
{

actor.RunTo(996, 412);
actor.TurnTo(DI_RIGHT);
actor.Talk("There could be something interesting on the other side.");
actor.Talk("If only i had something to help me to cross that gap...");
}

on "ledder"
{
  actor.GoTo(995, 366);
  actor.TurnTo(DI_LEFT);
  actor.PlayAnimChannel(0,"pickup_low");
  Game.DeleteItem("ledder");
}
Title: Re: Invenotry item doesnt work
Post by: metamorphium on September 16, 2012, 06:30:28 PM
Hi,

1. check left click handler in scripts/game.script (this is the part where is usually scripted item handling)
2. check items definition (is the item really called ledder (as opposed to ladder)?
3. post relevant scripts here :)
Title: Re: Invenotry item doesnt work
Post by: Yakuzza on September 17, 2012, 07:29:54 PM
Thanks metamorphium!
It was game.script handler i was missing.
To bad the tutorial never covered that area.
Title: Re: Invenotry item doesnt work
Post by: metamorphium on September 17, 2012, 10:04:50 PM
how comes?

http://res.dead-code.org/doku.php/wmebook:ch4
Title: Re: Invenotry item doesnt work
Post by: Yakuzza on September 17, 2012, 11:21:51 PM
Oh i never covered online tuts.
Thanks again!