131p6 - .cel scripts "mark" command

Report bugs, bug fixes and workarounds here.
Topic author
don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

131p6 - .cel scripts "mark" command

Post #1by don » 20.07.2003, 16:55

OS: WinXP Pro SP1
Ver: 1.3.1 pre6
RE: .cel scripts

Command: mark

Can someone explain how the "mark" command is supposed to function?

The "object" value works.

The "size" value does not work (#.#)?
I have tried small decimal to large integer "size" values with no change in the display size of the marker.

The "color" value does not work ( [#.# #.# #.#] )?
I have tried small decimal to large integer "size" values, with no change in the display color of the marker. All I get is red.

The "symbol" value does not work (diamond square triangle plus X)?
All I get is an "X".

Here is an example of the code I'm trying to use ...

Code: Select all

 renderflags { set "markers" }

 mark { object "Earth"
        size 10  # (valid value range?)
        color [1.0 0.0 0.0] # (what values where for what colors?)
        symbol "plus" } # (diamond square triangle plus X)


Thank you.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #2by chris » 20.07.2003, 19:20

The symbol, color, and size parameters to the mark command should all be working. I just verified it on my version of Celestia . . . Perhaps you need to specify "Sol/Earth" instead of "Earth"? There are some sample mark commands (commented out) in the start.cel script . . . try cutting and pasting them into a script and running it. You should see markers on the four inner planets with different sizes, colors, and symbols.

Actually, just cut and paste this:

Code: Select all

mark { object "Sol/Mercury" color [ 1 1 0 ] symbol "triangle" }
mark { object "Sol/Venus" color [ 1 1 0.7 ] symbol "square" }
mark { object "Sol/Earth" color [ 0 0.3 1 ] symbol "x" }
mark { object "Sol/Mars" color [ 1 0.3 0.3 ] symbol "plus" }


--Chris

Topic author
don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #3by don » 20.07.2003, 21:19

Hi Chris,

I think I found the snag ...

If an object has a mark already set for it, issuing another mark command for that object does nothing -- the existing mark remains in place. Here's an example of both ...

(Do a keyboard 3 g first <smile>.)

Code: Select all

{
#----< marking test >-----------------------------------
# This works...

renderflags { set "markers" }
unmark { object "Sol/Earth" }

mark { object "Sol/Earth" color [ 0 0.3 1 ] symbol "x" }
print  { text " Small blue 'X' on Earth." row  -3 duration 3 }
wait   { duration 3 }

unmark { object "Sol/Earth" }
mark { object "Sol/Earth" size 40 color [0.0 1.0 0.0] symbol "diamond" }
print  { text " Large green diamond on Earth." row  -3 duration 3 }
wait   { duration 3 }


# This does NOT work...

renderflags { set "markers" }

mark  { object "Sol/Earth" color [ 0 0.3 1 ] symbol "x" }
print { text " Small blue 'X' on Earth." row  -3 duration 3 }
wait  { duration 3 }

mark  { object "Sol/Earth" size 40 color [0.0 1.0 0.0] symbol "plus" }
print { text " Large green plus on Earth." row  -3 duration 3 }
wait  { duration 3 }
#-------------------------------------------------------
}


Is this the intended behavior?

Also, when I am *in* the solar system, "Earth" works just like "Sol/Earth". BUT, it's probably a GOOD idea to get in the habit of using the "Sol/" prefix to address any solar system objects ... just in case (smile).

-Don


Return to “Bugs”