Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Casius
Novice


Joined: 03 Sep 2004
Posts: 34

PostPosted: Thu Feb 03, 2005 10:18 pm   

scripting
 
Okay here is the question:

how do i get the mud to capture more that 1 line as a trigger. eg

You pump out at %1 with a powerful side kick.
You connect!

i want to set that as a trigger but i am not sure how to set it as one trigger. I have tried this:

You pump out at %1 with a powerful side kick. $You connect

but when testing the trigger the pattern does not match

help would be greatly appreciated
Reply with quote
Vorax
Apprentice


Joined: 29 Jun 2001
Posts: 198
Location: USA

PostPosted: Thu Feb 03, 2005 10:28 pm   
 
#TRIGGER {You pump out at * with a powerful side kick.} {commands}
#CONDITION {You connect!} {commands} {within|param=1}
Reply with quote
Casius
Novice


Joined: 03 Sep 2004
Posts: 34

PostPosted: Thu Feb 03, 2005 10:56 pm   
 
say okay i see sort of what you are doing, maybee i should elaborate a little more.

Im trying to add points together. I get 2 points for a kick and 1 for a punch. so this is what it should look like:

#trigger {you pump out at %1 with a powerfull side kick} {#add 2 torsopoint}
#condition {you connect} {#add 2 torsopoint} {within param=1}

the first ''you pump out with a side kick'' indicates that i have kicked but because i have kicked does not mean that i have connected that is why the condition is there right?

Am i understanding this correct.
Could you explain a little on the {within param=1} a bit
Btw how do i get the horizontal line just before the param=1

Thanks so very much for your help
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Feb 04, 2005 12:13 am   
 
You are understanding things quite well so far. As for {within param=1}, that is the spot in the #CONDITION syntax that allows you to specify what kind of trigger this particular #CONDITION will be. If I recall rightly, this information is available in or linked to the help info for the #CONDITION command. Basically, in the above example, you are telling ZMud that this line should only be looked for on the immediately-following line. For example:

You pump out at...
You connect!

as opposed to:

You pump out at...
>look
[This Room]
This room is very bland. Not much to see here, so don't waste time looking. Move along, go back to your lives.
Obvious exits: none

You connect!
_________________
EDIT: I didn't like my old signature
Reply with quote
Casius
Novice


Joined: 03 Sep 2004
Posts: 34

PostPosted: Fri Feb 04, 2005 12:36 am   
 
If you had to read my scripting above that goes as follows:

#TRIGGER {You pump out at %1 with a powerful side kick.} {#add torsopoint 2}
#condition {You connect to the torso} {#add torsopoint 2} {within|param=1}

Is the scripting correct cause i seem to be getting a strange parsing error
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Feb 04, 2005 1:13 am   
 
#TRIGGER {You pump out at * with a powerful side kick.} {}
#COND {You connect to the torso} {#ADD torsopoint 2} {within|param=1}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Casius
Novice


Joined: 03 Sep 2004
Posts: 34

PostPosted: Mon Nov 23, 2009 7:50 pm   
 
I know this is an old thread, but i have been dormant and now im back trying to complete this train of thought.

Nexela i have

#TRIGGER {You pump out at * with a powerful side kick.} {}
#COND {You connect to the torso} {#ADD torsopoint 2} {within|param=1}

but it still give me a parsing error for some reason any idea why?

Access violation at address 004BDAAC
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Nov 23, 2009 9:03 pm   
 
That's not a parse error. Delete the trigger and rebuild it (even a simple cut and paste is likely to do the trick.) When you get an AV, it's a great indicator that something in your layout, a package, or even within the mapper has gotten corrupted. The only real way to fix the corruption is to remove it, but unfortunately that's usually something you have to find on your own.

Corruption can:

1)"unhinge" settings (meaning, CMud totally forgets it even exists or where to find it. It never works, but you can clearly see/work on it in the editor as though nothing was wrong)
2)delete settings (meaning, CMud for some reason skipped over a particular trigger/etc and didn't save it to file)
3)move settings (in most cases, this means triggers end up on the same level as windows)
4)"scramble" settings (parts of the setting remain intact, parts of it get moved/deleted/overwritten with garbage/etc)
5)hide settings (settings simply not shown in the package editor at all, though they are not flagged as hidden, yet are still there enough to cause the rename window to pop up if you recreated the missing settings)

Most users probably just live with it for a while, and then when they finally have to do something about it they just run the packages through the export/import process (export old package, delete old package, create new package, import exported data to new package) and things are fixed in much the same way as a reinstall fixes things (ie, you know it's fixed but you don't know how/why).
_________________
EDIT: I didn't like my old signature
Reply with quote
Casius
Novice


Joined: 03 Sep 2004
Posts: 34

PostPosted: Wed Nov 25, 2009 8:58 am   
 
Sorry to make it a bit more clear, im using zmud at the moment not cmud.

I have tried to delete the trigger and rebuild it and it didnt work. I think i have found an alternative though.

I have tried using states trigger. On zmud there is a tab in the trigger editing box called states. first line says this :

You pump out at (%w) with a powerful side kick. | Pattern | blank | #cw blue,white (second state is as follows)
You connect to the left leg! | Pattern | 2 | #add torso 2

the problem i am having with this is that if line one is triggerd and line two is not the trigger stays in status two untill status two is triggered. How can i reset it back to status one without it having to be triggered?
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Nov 26, 2009 6:58 am   
 
change the options of the second state to be Within and the value to 1 (or how ever many lines away it is)
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Casius
Novice


Joined: 03 Sep 2004
Posts: 34

PostPosted: Thu Nov 26, 2009 9:25 am   
 
I did that thanks and it works, amazing!! heh thanks for the help
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net