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: Problems with Smart Cursor (I think?)  (Read 2852 times)

0 Members and 1 Guest are viewing this topic.

Mikael

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 127
    • View Profile
    • MDNA Games
Problems with Smart Cursor (I think?)
« on: March 13, 2007, 03:06:13 AM »

I have this problem with inventory objects. When I move a certain object over an entity in the scene, I get the "Use object with" text, wether the inventory object is set for an event with the entity or not. I understand that I can fix this with "Game.SmartItemCursor = true;", but I can't get it to work. I've tried it everywhere, including the game.script file. Where exactly should I put it?

Once again, thankful for any help!

Regards,

Mikael
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Problems with Smart Cursor (I think?)
« Reply #1 on: March 13, 2007, 08:33:26 AM »

The Game.SmartItemCursor property only affects the mouse pointer appearance. Since the "Use XXX with YYY" caption is entirely scripted, you'd have to modify the appropriate script. The relevant code is in game_daemon.script. Look for something like:

Code: [Select]
WinCaption.Text = "Use " + Item.Caption + " with " + ActObj.Caption;

And change it to something like:

Code: [Select]
 
if(ActObj.CanHandleEvent(Item.Name))
  WinCaption.Text = "Use " + Item.Caption + " with " + ActObj.Caption;
else
  WinCaption.Text = "";
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mikael

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 127
    • View Profile
    • MDNA Games
Re: Problems with Smart Cursor (I think?)
« Reply #2 on: March 13, 2007, 05:25:56 PM »

Once again, thanks.

Regards,

Mikael
Logged
 

Page created in 0.027 seconds with 19 queries.