Jump to content
  • 0
Sign in to follow this  
Eridonis

Specific Name Event?

Question

2 answers to this question

Recommended Posts

  • 1

Yes. I saved a handy dandy cheat sheet to use for various things and after testing out what you are asking for it is entirely possible to do.

7d30dd703c6f3c36aa7fe2af4a13f770.png

 

The way you would accomplish what you're asking is quite simple.

You have a variable string that is set to the player's name and you have another variable string that is set to \pn (player name).

You use these two variables to compare and if they are equal X happens (whatever it is you want to happen) else, nothing happens.

 

This is my cheatsheet that I found through digging around at some point:

# Textbox variables
\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)

 

You can also find the same by clicking this:

c8d2afa885fbc128b5eec3a2bf345f03.png

 

Hope this helps!

 

*Edit: Also as a side-note - developing a game requires quite a bit of debugging when you find your events are not working properly. These variables help tremendously in the debugging process. Having large events with a lot of moving parts let's me type a single chat command to see all of the variables and what they're set as during different parts of the event to make sure everything is working properly and if it's not I can see exactly or roughly where the event is not working in the way I want it to.

Share this post


Link to post
Share on other sites
  • 0

Not sure about this, but if you need for someone to have a gift or an access but here 2 easy way :

- give him a consumable item that will make a variable "Username" on. Then, make this var as a conditionnal.

- Make an npc in a no player place, teleport him to this npc and make the npc activate the variable "Username"  and use it as condition. 

 

If you want the player to be able to access to the npc without seeing him in game

- Make an npc with a password that activate the "Username" variable and use it as condition. remove it after the player got it activated.

 

There may be also other way.

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
Sign in to follow this  

×
×
  • Create New...