Jump to content

Event Text Variables


jcsnider

Recommended Posts

You can use the following variables in event commands that display text. (Show Text/Show Options/Add Chatbox Text)

 

  • \pn  -- shows the players name that triggered the event
  • \en -- shows the name of the event that is activated
  • \onlinecount -- shows the number of players that are online
  • \onlinelist -- lists all the players that are online
  • \param -- takes the string after a /command. Example: /welcome kibbelz, will return "kibbelz" in the text display. Available from beta 4.0 onwards.
  • \hour -- displays the hour component of the games time (12 hour format)

  • \24hour -- displays the hour component of the games time (24 hour format)

  • \minute -- displays the minute component of the games time

  • \second -- displays the second component of the games time

  • \period  -- displays whether or not it is morning/night in game (AM or PM)

  • \pv{#}    -- displays the value of a player variable (replace # with the variable id set in the switch & variable editor)

  • \ps{#}    -- displays the value of a player switch (replace # with the switch id set in the switch & variable editor)

  • \gs{#}    -- displays the value of a global switch (replace # with the switch id set in the switch & variable editor)

  • \gv{#}    -- displays the value of a global variable (replace # with the variable id set in the switch & variable editor)

 

New in Beta 6.1

  • \evtParams -- Lists all available parameters for an event
  • \evtparam{#} -- displays value of an event parameter

 

 

Deprecated ( < Beta 4)

Spoiler

Event/Player Variables in versions < B4.X

  • \pv #   -- displays the value of a player variable (replace # with the variable id shown in the switch & variable editor)

  • \ps #   -- displays the value of a player switch (replace # with the switch id shown in the switch & variable editor)

  • \gs #   -- displays the value of a global switch (replace # with the switch id shown in the switch & variable editor)

  • \gv #   -- displays the value of a global variable (replace # with the variable id shown in the switch & variable editor)

 

 

Stay tuned, we will be adding more commands and examples later.

Link to comment
Share on other sites

  • 1 month later...

Would love to see the following commands (note the command syntax and ideas are all suggestions only and not meant to be begging... do with this wish as you list...delete it if you want, just ideas that would be nice to see)

 

\pVar[x] - Player variable cast to string

\gVar[x] - Global variable cast to string

\sTime - Server time (maybe split into \sTimeHour \sTimeMin \sTimeDay?)

 

can think of a couple of things I could use these for now as well as a lot of other commands that would be useful to use in text and chat boxes.

 

I have events already using conditional branches, but this would also be good for things like custom bank storage for currency "Your current balance is: \pVar[BankAmount]"

 

 

Thanks for this addition, by the way. It is a great feature to have.

 

 

EDIT:

On 8/10/2016 at 4:34 AM, jcsnider said:

will fix up this post, add more commands, and add examples later.

 

maybe I should just learn to read ;)

Link to comment
Share on other sites

These are very useful. Makes it very easy to create our own Welcome and login messages using the common event editor. Thanks JC!

 

 

Here is a screenshot of what I put together. Only took me two minutes using your commands and the chat-box text option in the common event system. Its easy to replicate the old eclipse login messages.

chat_zps6k95t3qu.png

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...

You all will be happy to know that along with the new /commands you can now output game time, server switches/variables, and player switches/variables once Beta 4 is released.

9ba4faac0344ffb0f5e556258cfddf80.png

 

902b944bb591b65a9f27a7310a13e635.png

 

The new commands in Beta 4 are:

  • \hour
  • \24hour (Shows hour in military format)
  • \minute
  • \second
  • \period  (AM or PM)
  • \pv #   (Player Variable)
  • \ps #   (Player Switch)
  • \gs #   (Global Switch)
  • \gv #   (Global Variable)

 

For the switches and variables you have to follow the slash command with the id of the switch/variable you want to display. In Beta 4 the id will be shown in the switch/variable editor:

e92b2b4b6adc2fc9b8df0642dabb7146.png

Link to comment
Share on other sites

I hate to be "that guy" but is there an ETA for this / Beta 4? I actually just found out about the Intersect Engine and downloaded it as I think it's the perfect engine for a game I had previously been building in GameMaker using node.js and socket.io, and it would save me a lot of trouble / hassle and actually fit greatly! Only problem is I haven't found a way using the current build to properly have custom "levels" for various "skills" like 'trading, alchemy, masonry' etc. so planned to just create player variables for them but without no way to display them currently, players would never know their level! :)

 

Love the engine so far guys! :)

Link to comment
Share on other sites

1 minute ago, Gibier said:

Maybe try to post a suggestion to show player variable with the event editor?

 

Like: your level of woodcutting is /pv1 (player variable 1)

 

This is the plan, but I don't believe that command is actually in the engine yet.

 

Quote

\pv #   -- displays the value of a player variable (replace # with the variable id shown in the switch & variable editor)

\ps #   -- displays the value of a player switch (replace # with the switch id shown in the switch & variable editor)

\gs #   -- displays the value of a global switch (replace # with the switch id shown in the switch & variable editor)

\gv #   -- displays the value of a global variable (replace # with the variable id shown in the switch & variable editor)

 

I think all four of those are currently not in the engine and will be coming in Beta 4, which is what had me confused. I searched and came across this post and read the top and thought it was possible, then after trying for an hour in various ways realized I don't think it's actually in yet :)

Link to comment
Share on other sites

Just now, Teppy said:

 

This is the plan, but I don't believe that command is actually in the engine yet.

 

 

I think all four of those are currently not in the engine and will be coming in Beta 4, which is what had me confused. I searched and came across this post and read the top and thought it was possible, then after trying for an hour in various ways realized I don't think it's actually in yet :)

 

Hey it's not write on the first post. But at mid-page only available from beta 4.

Link to comment
Share on other sites

14 minutes ago, Gibier said:

 

Hey it's not write on the first post. But at mid-page only available from beta 4.

Yep! Which is why I asked if there was an ETA :) New here so not sure how long between releases.

Link to comment
Share on other sites

4 minutes ago, jcsnider said:

Couple weeks. No guarantees though. 

Out of curiosity, if I wanted to try and code something like this myself at least temporarily in the short term...where would I start? :)

Link to comment
Share on other sites

Just now, SPQR Panda said:

This being... the entire engine?

Noooo sorry.  Assumed the engine was open source for some reason and thought there may be a way to code in something that would display player variables :) Sorry!

Link to comment
Share on other sites

  • 7 months later...
  • jcsnider pinned this topic
  • 8 months later...
19 hours ago, SarcasticSloth24 said:

Is there any way to use a player's class in an event? Would \param be able to do this?

 

Nope. You can just have a list of conditional branches that each check your class and have different text based on it.

/param is basically useless which will hopefully be expanded on in the future.

Link to comment
Share on other sites

  • 1 year later...
  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...