Something we should really have done some time ago...
The php code button on the post editor has now been replaced with a CubeScript button:
You can also manually use the [noparse][cubescript][/cubescript][/noparse] tags to the same effect. This will highlight your cubescript keywords in pretty colours, all thanks to Luc4s (and some modification of a nice plugin by CrazyCat)
Example:
[cubescript]// CubeScript placed in this file is automatically executed on each startup.
// "editent" command:
// This command collects all the attributes of the nearest entity, and then
// prompts that into a handy command that allows you to edit that entities
// attributes easily.
// Note: The editent command can NOT define rotation/yaw inside the command!
// However, the current yaw of the player will define the rotation/yaw when
// using the command!
alias editent [
if (strcmp (getenttype) "mapmodel") [
saycommand "/entset" (getenttype) (getentattr 1) (getentattr 2) (getentattr 3)
] [
if (> (findlist "light sound clip plclip" (getenttype)) -1) [
saycommand "/entset" (getenttype) (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
] [
saycommand "/entset" (getenttype) (getentattr ((> (findlist "playerstart ctf-flag" (getenttype)) -1)))
] ] ]
// "convertclips" command:
// This command automatically changes the a "clip" to a "plclip" entity or vice-versa.
alias convertclips [
if (strcmp (getenttype) "clip") [
entset plclip (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
] [
if (strcmp (getenttype) "plclip") [
entset clip (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
] [
echo "No changes made. This entity isn't a clip or a plclip."
echo "Try using the /closestenttype command to find a specific entity."
] ] ][/cubescript]
edit: Also, in order to show the [noparse][cubescript][/noparse] tags in my post, I added the noparse plugin by Ad Bakker, which forces the forum to ignore mycode tags if you put them inside [noparse][noparse][/noparse][/noparse] tags.
The php code button on the post editor has now been replaced with a CubeScript button:
You can also manually use the [noparse][cubescript][/cubescript][/noparse] tags to the same effect. This will highlight your cubescript keywords in pretty colours, all thanks to Luc4s (and some modification of a nice plugin by CrazyCat)
Example:
[cubescript]// CubeScript placed in this file is automatically executed on each startup.
// "editent" command:
// This command collects all the attributes of the nearest entity, and then
// prompts that into a handy command that allows you to edit that entities
// attributes easily.
// Note: The editent command can NOT define rotation/yaw inside the command!
// However, the current yaw of the player will define the rotation/yaw when
// using the command!
alias editent [
if (strcmp (getenttype) "mapmodel") [
saycommand "/entset" (getenttype) (getentattr 1) (getentattr 2) (getentattr 3)
] [
if (> (findlist "light sound clip plclip" (getenttype)) -1) [
saycommand "/entset" (getenttype) (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
] [
saycommand "/entset" (getenttype) (getentattr ((> (findlist "playerstart ctf-flag" (getenttype)) -1)))
] ] ]
// "convertclips" command:
// This command automatically changes the a "clip" to a "plclip" entity or vice-versa.
alias convertclips [
if (strcmp (getenttype) "clip") [
entset plclip (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
] [
if (strcmp (getenttype) "plclip") [
entset clip (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
] [
echo "No changes made. This entity isn't a clip or a plclip."
echo "Try using the /closestenttype command to find a specific entity."
] ] ][/cubescript]
edit: Also, in order to show the [noparse][cubescript][/noparse] tags in my post, I added the noparse plugin by Ad Bakker, which forces the forum to ignore mycode tags if you put them inside [noparse][noparse][/noparse][/noparse] tags.