Polymorph Commands (2)

So in our previous post we figured out how to do polymorph "open" for Greek, which doubles for "switch on":

<command name="anoikse">
<pattern><![CDATA[^άνοιξε (?<object>.*)$]]></pattern>
<script type="script">
	if (HasScript (object, "turnon")) {
		do (object, "turnon")
	}
	else {
	TryOpenClose (true, object)
	}
</script>
</command>

<command name="klise">
<pattern><![CDATA[^κλείσε (?<object>.*)$]]></pattern>
<script type="script">
	if (HasScript (object, "turnoff")) {
		do (object, "turnoff")
	}
	else {
		TryOpenClose (false, object)
	}
</script>
</command>

<template name="Open">Άνοιξε</template>
<template name="Close">Κλείσε</template>
<template name="SwitchOn">Άνοιξε</template>
<template name="SwitchOff">Κλείσε</template>

Now I want to implement some more things:

  1. polymorph "hit", doubles as "knock":
    I guess I just need to remove "knock", and handle "hit door" as I would "knock door" in game?

  2. polymorph "put", doubles as "wear".
    How do I go about it? Is there a HasScript(object, "wear") function?

  3. "drop" and "throw" are used interchangeably in Greek (verb is "paeta").
    I propose using syntax to differentiate, i.e. "paeta stone to vase" will be throw, while "paeta stone" will be drop. How do I implement that?

Help will be appreciated!


In the case of put/wear, I think it's the same as in English. "put on shirt" or "put shoes on" are synonyms for wear. If I wanted to use "put", I'd be saying something like "put apple on table". So you could have a wear command with the pattern "put on #object#;put #object# on" and a put command with the pattern "put #object1# on #object2#;put #object1# in #object2#".

(Haven't tried that in Quest, but it looks like it should work without any special code)


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums