|
hpoonis2010 Adept
Joined: 18 Jun 2019 Posts: 279
|
Posted: Wed Jun 19, 2019 5:34 pm
cMUD...what works? |
#EVENT onRoomEnter
I tried a #SWITCH to set the room colour ... that didn't work.
I had a basic #PRINT %gmcp.room.info.terrain statement...that failed to send anything to any window.
I had a simple 'map' command that should display an aardwolf MAP ... that didn't work.
So...does EVENT onRoomEnter not do anything at all other than waste time and create frustration?
Or is there some undocumented restriction on what can happen within an EVENT?
map
#PRINT %gmcp.room.info.terrain
$myTerrain = %gmcp.room.info.terrain
#SWITCH ($myTerrain)
("air") {#CALL %roomcol (,$87CEEB)}
("beach") {#CALL %roomcol (,$FFD700)}
("bridge") {#CALL %roomcol (,$708090)}
("cave") {#CALL %roomcol (,$696969)}
("city") {#CALL %roomcol (,$708090)}
("desert") {#CALL %roomcol (,$EEE8AA)}
("dungeon") {#CALL %roomcol (,$2F4F4F)}
("field") {#CALL %roomcol (,$7CFC00)}
("field3") {#CALL %roomcol (,$228B22)}
("forest") {#CALL %roomcol (,$228B22)}
("hills") {#CALL %roomcol (,$FFFFFF)}
("ice") {#CALL %roomcol (,$F0FFFF)}
("jungle") {#CALL %roomcol (,$006400)}
("mountain") {#CALL %roomcol (,$FFFFFF)}
("ocean") {#CALL %roomcol (,$20B2AA)}
("pillar") {#CALL %roomcol (,$708090)}
("plain") {#CALL %roomcol (,$98FB98)}
("quicksand") {#CALL %roomcol (,$F0E68C)}
("river") {#CALL %roomcol (,$00CED1)}
("road") {#CALL %roomcol (,$8B4513)}
("shore") {#CALL %roomcol (,$00FFFF)}
("smallroad") {#CALL %roomcol (,$D2691E)}
("swamp") {#CALL %roomcol (,$808000)}
("trail") {#CALL %roomcol (,$F4A460)}
("volcano") {#CALL %roomcol (,$FF4500)}
("underwater") {#CALL %roomcol (,$008B8B)}
("underground") {#CALL %roomcol (,$2F4F4F)}
("water") {#CALL %roomcol (,$4682B4)}
("waternoswim") {#CALL %roomcol (,$4169E1)}
The condition statements in the SWITCH ARE indented in the cMUD package editor.
Am I missing somthing fundamental?
When I used zMUD I had no problem using the %onroomentry function to action a 'map' command AND a 'recon' command.
And...
#CALL %roomcol (, $FFFF00)
On the MUD command line does NOTHING but generate an error.
I am only using cMUD for a few days but already I am regretting my purchase and should have stuck with zMUD |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Thu Jun 20, 2019 6:16 pm |
The #SWITCH command looks fine, but if the %gmcp variable has nothing in it, this is rather expected results.
I don't have much experience with IRE games, but you may have some luck with the #SENDGMCP command.
You DO need to toggle %maplocked to change colors via script, but that doesn't explain the error from the commandline, usually that function doesn't throw errors...
Is there a chance you disabled parsing on the command line? (the lil computer icon would have a red X through it)
That would generte a unknown command error from the game being unable to understand CMUD commands. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
hpoonis2010 Adept
Joined: 18 Jun 2019 Posts: 279
|
Posted: Fri Jun 21, 2019 2:04 pm |
The gmcp is/was fine. Ultimately the problem was this: I had two installs of the software on two different systems and had installed them to set session data in the %userdir% area. Then, when I moved to another system, nothing appeared to work properly. I suspect filepaths are the problem.
I got around this issue by reinstalling on both systems to use the CMUD install directory and set both installs in SAME-DRIVE:\CMUD. So, when I have finished on one system, I copy over all data that has been modified within the session time. It's not as elegant as using a USB stick or some such but it works.
I also recoded that SWITCH. Originally, it was in an %onroomenter event which did nothing...and the reason for that was that I was generating new maps and onroomenter is not the same as onroomcreate. So I copied the code to two events, one for roomcreate (for new maps) and one for roomenter (for existing rooms and to validate rooms after a while). This seemed inelegant so I recoded again and each room event just called (raised) a separate event and I rationalised two sets of switch into just one. |
|
|
|
|
|
|
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
|
|