 |
masterkrueger Wanderer
Joined: 24 Jan 2010 Posts: 65 Location: Hamburg
|
Posted: 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. |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
 |
masterkrueger Wanderer
Joined: 24 Jan 2010 Posts: 65 Location: Hamburg
|
Posted: Tue Jun 01, 2010 3:02 pm |
Thanks, that works!
|
|
|
 |
masterkrueger Wanderer
Joined: 24 Jan 2010 Posts: 65 Location: Hamburg
|
Posted: 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? |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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". |
|
|
 |
masterkrueger Wanderer
Joined: 24 Jan 2010 Posts: 65 Location: Hamburg
|
Posted: 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 |
|
|
 |
|
|