The Lady gives you a brief, contemptuous glance. <span style="font-family: FontTypeHere;">"Do I hear the buzzing of an impudent fly?"</span>
Marzipan wrote:
But as long as I have a thread here, one more quick question about verbs:
How do I make them more than one word long? For instance if I wanted the player to be able to wave, it works as 'wave npc' but not with 'wave to npc' or 'wave at npc'. I have it listed in the verb section as wave; wave to; wave at, but it seems like that format only works for single word aliases?
Silver wrote:"Marzipan"
But as long as I have a thread here, one more quick question about verbs:
How do I make them more than one word long? For instance if I wanted the player to be able to wave, it works as 'wave npc' but not with 'wave to npc' or 'wave at npc'. I have it listed in the verb section as wave; wave to; wave at, but it seems like that format only works for single word aliases?
You need to set up a command.
http://docs.textadventures.co.uk/quest/ ... mands.html
<command name="fight command">
<pattern>fight #text#</pattern>
<script>
enemy_variable = GetObject (text)
if (enemy_variable = null) {
foreach (object_x, AllObjects ()) {
if (object_x.alias = text) {
enemy_variable = object_x
}
}
}
if (enemy_variable = null) {
msg ("Wrong input, try again.")
} else {
// fight~combat scripts
}
</script>
</command>
<command name="hint_command">
<pattern>hint</pattern>
<script>
if (game.event_flag = 0) {
msg ("Try to find and kill the evil wizard.")
} else if (game.event_flag = 1) {
msg ("Didn't the wise owl say that you'll need the legendary dragon slayer sword to kill the dark dragon, which the evil wizard hid in his tower...?")
} else if ( game.event_flag = 2) {
msg ("Trick and wait for the dark dragon to exhaust it's fire, before attacking it.")
}
</script>
</command>
// you just have to type in: hint
<command name="alchemy_command">
<pattern>mix #text1# and #text2# together and then with #object1# and then use on #object2#</pattern>
<script>
alchemy_function (game.pov, text1, text2, object1, object2)
</script>
</command>
<function name="alchemy_function" parameters="self,ingredient1,ingredient2,weapon,enemy>
// this is way too advancd for me, laughs. As can seen I've no idea what I'm doing~going with this, lol.
</function>
Marzipan wrote:Yeesh, I feel like I've spent 90% of this game's development time working on this one NPC...
OurJud wrote:"Marzipan"
Yeesh, I feel like I've spent 90% of this game's development time working on this one NPC...
Tell me about it. You can spend all day on one problem and if you're anything like me you'll feel that it's another day wasted. What you've got to keep telling yourself, though, is that it's another 'thing' learned and that you have the script safe and sound, and working, should you need to do the same again.
Also, the 'add command' function (right click on the room/object/game/whatever and choose 'add command) has been an absolute Godsend since Jay told me about it. For ages I've wondered how to add alternative commands, in the hope of covering all logical inputs for a given circumstance, and this is it.
Having said all that, I've confused myself a little. When you add additional commands using this option, how does the game know what action those commands need to trigger. For instance, it understood 'big monkey' as I added it as a command, but how did the game know what I wanted that command to do??
Mmm, maybe I added those commands on the exit, not the room.
OurJud wrote:Having said all that, I've confused myself a little. When you add additional commands using this option, how does the game know what action those commands need to trigger. For instance, it understood 'big monkey' as I added it as a command, but how did the game know what I wanted that command to do??
Mmm, maybe I added those commands on the exit, not the room.
Marzipan wrote:You don't just have a script that moves the player out of the room?
Marzipan wrote:Well it's just the script then. With a command you're basically just telling the game 'whenever the player types [one of these commands] then do [this action].' It doesn't matter if the command is 'leave office', 'big monkey' or ' put the character in a ballerina dress and fly them to the moon', the action you told it to trigger is 'execute a script that moves the player out of the office'