Question about Player Status
Storyteller
04 Jul 2013, 00:43Hey, guys. I'm new to the forum, and I was just wondering if there was a way for me to add attributes to the player character, without them showing up in-game in the status section.
For example, if I want the character to have 100 health and 80 endurance without it saying "100" and "80" in a status tab. I want those values to remain unknown.
For example, if I want the character to have 100 health and 80 endurance without it saying "100" and "80" in a status tab. I want those values to remain unknown.
HegemonKhan
04 Jul 2013, 01:03Simply don't add them as STATUS ATTRIBUTES to your Game Player Objects (such as the default "player" object) or nor to your Game Object too.
Add Status Attributes -> causes them to be displayed on the right pane (called "status") when playing the game. So, do NOT do this, if you don't want them to be seen by the game player~user when they're playing your game.
----------------
Add Attribute -> creates the attribute for that object (but it remains hidden during game play)
Add Attribute and Add Status Attribute -> creates the attribute for the object and also displays it during game play
---------------
you can also display attributes as a message too (instead of via the right pane), simply via the:
Add a~new script -> script -> print a message -> change it to [EXPRESSION]-> msg (object_name.attribute_name)
--------------
for example, I could create a command (this is going to be in code... hopefully it will at least make sense to you somewhat):
Add Status Attributes -> causes them to be displayed on the right pane (called "status") when playing the game. So, do NOT do this, if you don't want them to be seen by the game player~user when they're playing your game.
----------------
Add Attribute -> creates the attribute for that object (but it remains hidden during game play)
Add Attribute and Add Status Attribute -> creates the attribute for the object and also displays it during game play
---------------
you can also display attributes as a message too (instead of via the right pane), simply via the:
Add a~new script -> script -> print a message -> change it to [EXPRESSION]-> msg (object_name.attribute_name)
--------------
for example, I could create a command (this is going to be in code... hopefully it will at least make sense to you somewhat):
// Note: you do have to create~add the attributes onto your "player" Game Player Object too
<command name="show_stats_command">
<pattern>stats</pattern> // this (stats) is what you type in during game play to activate the command
<script>
msg (player.hp)
msg (player.mp)
msg (player.strength)
(etc etc etc)
</script>
</command>
Storyteller
04 Jul 2013, 01:09HegemonKhan wrote:Simply don't add them as STATUS ATTRIBUTES to your Game Player Objects (such as the default "player" object) or nor to your Game Object too.
Right, thank you very much. Sorry for my ignorance. I really appreciate the help.
HegemonKhan
04 Jul 2013, 01:15don't worry about the ignorance, no question is too simple, I was a total noob to this stuff not all that long ago myself, hehe.
(I've come a long way, somewhat understanding this coding stuff and its logic language, though I got a long ways to go, lol)
(I've come a long way, somewhat understanding this coding stuff and its logic language, though I got a long ways to go, lol)
Storyteller
04 Jul 2013, 01:29HegemonKhan wrote:don't worry about the ignorance, no question is too simple, I was a total noob to this stuff not all that long ago myself, hehe.
(I've come a long way, somewhat understanding this coding stuff and its logic language, though I got a long ways to go, lol)
Sorry, one more thing, how do I set the start value of an attribute?
When I entered the "Health" name into attributes, it didn't let me change the value. I just want it to start at 100, and I want it to be able to go down as damage is received.
HegemonKhan
04 Jul 2013, 01:46if you're using the built in health system (the health checkbox at where ever it is, lol), I'm not sure, as it still confuses me too.
instead, I just create my own health system (make sure you uncheck that built-in health check box if you already checked it):
Player -> Attributes (Tab) -> Add Attributes ->
(you should be able to set these things, the name occurs upon adding~creating the attribute, then after its added~created, there should be a little box below, for choosing the "Type", then once your "Type" is choosen as "int ~ integer", then you can set the value as a number amount)
Name: health
Type: int (integer) // or double (if you want to use decimaled numbers, ie 100.00)
Value: 100 // or 100.00 (if using Type: double) // your starting value
to increase an attribute:
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name + number_amount (for example: player.health = player.health + 50)
to decrease an attribute:
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name - number_amount (for example: player.health = player.health - 50)
to multiply an attribute:
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name * number_amount (for example: player.health = player.health * 50)
to divide an attribute:
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name / number_amount (for example: player.health = player.health / 50)
------------------
a note note about reading attributes:
they change~become from right to left, so for example:
(starting) player.health = 100
(new) player.health = (old, the "starting") player.health - 25
(new) player.health = 100 - 25
(new) player.health = 75
so, logically, it is like this:
(starting) player.health <- 100
(new) player.health <- (old, the "starting") player.health - 25
(new) player.health <- 100 - 25
(new) player.health <- 75
and~or, if you understand algebraic substitution and its logic, that too is occuring, and will help you understand coding logic.
----------
now, you just need to have a place to put this, such as within an "orc" object's created verb called "attack", though this is a bit hard, so feel free to ask if you need help or don't understand what or how to do this stuff.
"Orc" (my~a created monster object for an example) -> Verb (Tab) -> Add Verb-> "attack" -> Add a~new script (see below) ->
Add a~new script -> Output or Script (I can't remember, meh)-> Print a message -> leave as [message] -> msg ("The orc attacks you first!")
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name - number_amount (for example: player.health = player.health - 50)
Add a~new script -> Output or Script (I can't remember, meh)-> Print a message -> change to [EXPRESSION] -> msg ("The orc hits you for 50 damage! You now have only " + player.health + " HP left!")
(incompleted, as its missing your attack~damage to the orc, hehe)
instead, I just create my own health system (make sure you uncheck that built-in health check box if you already checked it):
Player -> Attributes (Tab) -> Add Attributes ->
(you should be able to set these things, the name occurs upon adding~creating the attribute, then after its added~created, there should be a little box below, for choosing the "Type", then once your "Type" is choosen as "int ~ integer", then you can set the value as a number amount)
Name: health
Type: int (integer) // or double (if you want to use decimaled numbers, ie 100.00)
Value: 100 // or 100.00 (if using Type: double) // your starting value
to increase an attribute:
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name + number_amount (for example: player.health = player.health + 50)
to decrease an attribute:
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name - number_amount (for example: player.health = player.health - 50)
to multiply an attribute:
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name * number_amount (for example: player.health = player.health * 50)
to divide an attribute:
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name / number_amount (for example: player.health = player.health / 50)
------------------
a note note about reading attributes:
they change~become from right to left, so for example:
(starting) player.health = 100
(new) player.health = (old, the "starting") player.health - 25
(new) player.health = 100 - 25
(new) player.health = 75
so, logically, it is like this:
(starting) player.health <- 100
(new) player.health <- (old, the "starting") player.health - 25
(new) player.health <- 100 - 25
(new) player.health <- 75
and~or, if you understand algebraic substitution and its logic, that too is occuring, and will help you understand coding logic.
----------
now, you just need to have a place to put this, such as within an "orc" object's created verb called "attack", though this is a bit hard, so feel free to ask if you need help or don't understand what or how to do this stuff.
"Orc" (my~a created monster object for an example) -> Verb (Tab) -> Add Verb-> "attack" -> Add a~new script (see below) ->
Add a~new script -> Output or Script (I can't remember, meh)-> Print a message -> leave as [message] -> msg ("The orc attacks you first!")
Add a~new script -> Variables -> Set a variable or attribute -> object_name.attribute_name = object_name.attribute_name - number_amount (for example: player.health = player.health - 50)
Add a~new script -> Output or Script (I can't remember, meh)-> Print a message -> change to [EXPRESSION] -> msg ("The orc hits you for 50 damage! You now have only " + player.health + " HP left!")
(incompleted, as its missing your attack~damage to the orc, hehe)