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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
masterkrueger
Wanderer


Joined: 24 Jan 2010
Posts: 65
Location: Hamburg

PostPosted: Fri May 28, 2010 8:19 pm   

Room ID
 
When is the ID of a newly created room written?
After my #TAG Commands i use %roomcontent to add stuff but
the contedt is added to the last room entered.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri May 28, 2010 8:34 pm   
 
Move your %roomcontent() to an onRoomCreate event. A large process load can cause this to affect the wrong room, but otherwise it should ensure that the %roomcontent() is applied to the just-created room.
_________________
EDIT: I didn't like my old signature
Reply with quote
masterkrueger
Wanderer


Joined: 24 Jan 2010
Posts: 65
Location: Hamburg

PostPosted: Tue Jun 01, 2010 3:02 pm   
 
Thanks, that works!
Reply with quote
masterkrueger
Wanderer


Joined: 24 Jan 2010
Posts: 65
Location: Hamburg

PostPosted: Tue Jun 01, 2010 7:48 pm   
 
Sorry, I was wrong. The Items were already there because i reentered the room again.
I put that:

Code:
#CALL %roomcontents( , @RObjects)

In my onroomcreate alias, is that executed automatically when creating new rooms?

I put a print ... in there but it seems its not executed?

Do I have to do this manually?

btw. @RObjects is filles 1it|5it ....

I tried to enter onroomcreate manually and the output is ok but not after mapping a new room, the event did not fire.
Ill study the Documentation maybe i have misread something?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jun 01, 2010 8:39 pm   
 
Not an alias. An Event. An Event is somewhat like an alias or trigger, but it automatically is executed when the event name is raised with #RAISE. The event onRoomCreate is automatically raised by the mapper when it creates a new room.

To write an Event script, use the command #EVENT (similar to #ALIAS or #TRIGGER, but it creates an Event), or use the "NEW" pulldown menu in the Package Editor to create a "New Event".
Reply with quote
masterkrueger
Wanderer


Joined: 24 Jan 2010
Posts: 65
Location: Hamburg

PostPosted: Tue Jun 01, 2010 9:18 pm   
 
Okay, if I get it right there is the internal event "onroomcreate" and i see it in the Package Editor. I put an #print "test" in there so should be the test "test" everytime i move to a new room right? Ok i see, maybe it was an old onroomcreate and i had to manually enter it again?

As you say, I created a new event and voila it works :)

Thanks
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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