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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: Mon Jan 11, 2010 6:15 pm   

Trigger Line Skip Capture...
 
Iam trying to capture/trigger the room mob name that is first after the exit list
The Room Name Is My Constant
so I was trying to trigger off the room name and skip the next line and trigger the first or second mob word to a target variable

Dark Swamp
[Exits: east west]
Death Shade

so the end result here I would get the mob name in a mobtarget variable of death or death shade if its easier...

Thanks
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Jan 11, 2010 7:50 pm   
 
You'd use a three-state trigger:

#trigger {room name} {}
#condition {~[Exits: *~]} {}
#condition {([%w%s])} {mobtarget = %word(%1,1)} {Within|param=1}

I'm sure your game doesn't enforce the notion that an object keyword (in this sense, object refers to anything a game command can operate on) must be in a particular position, so the mobtarget variable will need more complexity to ferret out the one you want.
_________________
EDIT: I didn't like my old signature
Reply with quote
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: Mon Jan 11, 2010 8:08 pm   
 
do these conditions go into the trigger value?
cause I watching ti fire in the debugger, but its not sending it to mobtarget variable
is there also another setting i need to check or somethign
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Jan 11, 2010 8:38 pm   
 
nope. #trigger and #condition all define settings types like you would see in the settings tree. They are the commands that equate to the New... button (#trigger = New Trigger, #condition = New Trigger State). Unless you pasted the above into the command line or editor, the only other way to create a condition is through the Package Editor.

If you're doing things via the package editor, then you only copy the parts to their appropriate text boxes:

#trigger "trigger id" {trigger pattern} {trigger code} "trigger class path" {trigger options}

Stuff in red is the proper syntax "filler" so that the parser can properly read what you are pasting into the command line, text editor, or in the case of the XML code into the settings tree.

Stuff in blue is the stuff you type in, click with the mouse, or otherwise enter via the Package Editor (note that the zscript format is older and does not contain some of the newer features).
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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