Jump to content
  • 0

Player Variables, what are they?


repgainer3

Question

11 answers to this question

Recommended Posts

  • 0

No, you cannot access internal engine variables. (Such as health, stats, etc) Player Variables instead are numbers tied to players accounts. You can create player variables using the Switch and Variable editor.

 

You can modify the numbers through events (set variable command). In events you can then use conditional branches to do different things based on the values of the player variable.

 

Example use of a player variable which allows the player to talk to an event up to 5 times. If the player keeps nagging this event it will tell the player that they've bothered him enough.

Conditional Branch [Player Variable: Times talked to Bob is less than 5]
  Show Text [How's it going, player?]
  Set Player Variable (Times talked to Bob  - Add 1)
Else
 Show Text [I think it's time you leave me alone now.... this is starting to get creepy]
End Branch

Player Variables can have a different value for every player. Player variables start at zero.

 

Global Variables are the same value for all players. You use that if you want event actions for one player to change events around the game world for all players.

Link to comment
Share on other sites

  • 0
18 minutes ago, repgainer3 said:

Woah woah wait, we're not allowed to access the engine variables?!??! Isn't that kind of important?

Nah not very important, the event system is to make events within the game, like quests or objectives and other like things of that sort. If you wanted to access things like HP or MP you can do so when the source is available and must be programmed. 

 

Out of curiosity, what did you have in mind to try and do IF you could access the engines variables. 

Link to comment
Share on other sites

  • 0
1 hour ago, DudeItsCorey said:

Nah not very important, the event system is to make events within the game, like quests or objectives and other like things of that sort. If you wanted to access things like HP or MP you can do so when the source is available and must be programmed. 

 

Out of curiosity, what did you have in mind to try and do IF you could access the engines variables. 

I for one would like to be able to read (and sometimes set as my own variables) game avriables for various reasons. and uses in events

- player x, y, and map for a delayed respawn system

- player level, for use when player changes class

I'm only early in my game design and I'm sure I will find other frustrations where I wish I could access the variables

 

Link to comment
Share on other sites

  • 0
5 minutes ago, Terrafyde said:

I for one would like to be able to read (and sometimes set as my own variables) game avriables for various reasons. and uses in events

- player x, y, and map for a delayed respawn system

- player level, for use when player changes class

I'm only early in my game design and I'm sure I will find other frustrations where I wish I could access the variables

 

 

For the player level you could create a player variable "Player Level" and create an event who is active each time the player level up. The event increment the Player Level variable of 1 each time that the player level up.

Link to comment
Share on other sites

  • 0

 

On 2/12/2017 at 2:23 PM, DudeItsCorey said:

Out of curiosity, what did you have in mind to try and do IF you could access the engines variables.

I'd like to have access to these variables so that I could change the power system for one, I'd like to make more modes for admin, and set different permissions for them, or I could completely change the HP system, to a more efficient system, running by higher numbers, hidden with no health number on screen, that actually would help to make PVP and game fighting more difficult.

Link to comment
Share on other sites

  • 0

I honestly think that the game variables are very important, so many issues have come up because of not having the source, I'm not complaining, I get that he want's the code to be perfect when he releases it, but I don't see why trusted developers on the site can't have access to it. I would honestly help perfect it, and the games that these developers are working on.

Link to comment
Share on other sites

  • 0

The event system doesn't work like that though. It's for better interaction with NPCs, quests, you can make text pop up. Even if they let you touch the variables they'd have to delve even farther, if even possible to do things like that. The event system is not like a plugin system it's more, dynamic interaction with things. 

Link to comment
Share on other sites

×
×
  • Create New...