Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: SBOVIS 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
-
The default scripts already allow this. Just add the following code to the NPC's script:
on "default-use"
{
this.Talk("I don't know anything about this.");
}
on "SomeSpecialItem"
{
this.Talk("It's a very special item.");
}
-
so
on "default-use"
is like a wild card then for all items??
Cheers
-
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 :)
-
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.