Jump to content
jcsnider

Event Text Variables

Recommended Posts

As of Intersect 1.7 Alpha 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 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.

Share this post


Link to post
Share on other sites

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 ;)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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! :)

Share this post


Link to post
Share on other sites

Why not just do something like:

 

Command "/skill"

 

Which will display something like:

 

Hi /pn,

Your woodcutting level is /pv1

Your fishing level is /pv2

 

 

Share this post


Link to post
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 :)

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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? :)

Share this post


Link to post
Share on other sites
2 minutes ago, Teppy said:

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? :)

This being... the entire engine?

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

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

×