Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Is there a way to use one response to ALL items??  (Read 2678 times)

0 Members and 1 Guest are viewing this topic.

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Is there a way to use one response to ALL items??
« on: December 05, 2005, 03:09:26 PM »

Hi all,
        Just a small question, How do I give a single universal response to giving any of the carried items in the actors inventory to an NPC without codeing for every single item in the NPC script.


Also if I want say one item out of a possible twenty items to have a specific response and all the rest be a default response can this be done to override the default response.


For example: -

 I have 5 items, item A,B,C,D,E and on NPC 1 if I use item A,C,D,E I get "I do not know anything about them!" but on item B i get "Oh thats a very precious item, I will give you 2 gold coins for that!"




If anyone has anyway to code this please let me know, It`s taking me ages to implement this. hahahahahahahaa

Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Is there a way to use one response to ALL items??
« Reply #1 on: December 05, 2005, 03:26:27 PM »

The default scripts already allow this. Just add the following code to the NPC's script:

Code: [Select]
on "default-use"
{
  this.Talk("I don't know anything about this.");
}

on "SomeSpecialItem"
{
  this.Talk("It's a very special item.");
}
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: Is there a way to use one response to ALL items??
« Reply #2 on: December 05, 2005, 04:44:27 PM »

so

on "default-use"

is like a wild card then for all items??



Cheers
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Is there a way to use one response to ALL items??
« Reply #3 on: December 05, 2005, 10:34:05 PM »

so

on "default-use"

is like a wild card then for all items??
Well, yes. It's actually all scripted in the default game.script, if you're interested :)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: Is there a way to use one response to ALL items??
« Reply #4 on: December 06, 2005, 10:13:12 AM »

Thanks Mnemonic, thats why I could not find it as a command in the help text.

Totally interested, I think this engine rocks.



Still think a way of duplicating entites and regions in SCENE.EDIT would be helpful though. hahahahahahaha copy and paste would sufice

Many thanks.
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS
 

Page created in 0.023 seconds with 20 queries.