Need help with test game.
BlunderingFool
30 Jan 2014, 17:16So I'm making a condensed adult RPG in quest and thought it might be a little more tidy to make a forum post for everything I need help with, as opposed to many posts for every problem.
And my main problem at the moment is that I've defined the player's starting attributes just fine but have no clue how to get those to display under health in the status pane, even when looking at solutions to other problems. Additionally it might be better to replace the health % with health <Number of hit points> but I have no idea how to get about doing that. =/
And my main problem at the moment is that I've defined the player's starting attributes just fine but have no clue how to get those to display under health in the status pane, even when looking at solutions to other problems. Additionally it might be better to replace the health % with health <Number of hit points> but I have no idea how to get about doing that. =/
HegemonKhan
30 Jan 2014, 20:09I had trouble myself with using the built-in "health" attribute, so I can't help you with this stuff, but I can help in making your own attributes (and having them display in the pane during game play) isn't very hard to do (and you can do much more cool things, such as displaying: min/max, ie: 999/999 HP).
if you looked at this:
viewtopic.php?f=10&t=4099
and still are having trouble, let me know and I'll try to help you with it.
if you looked at this:
viewtopic.php?f=10&t=4099
and still are having trouble, let me know and I'll try to help you with it.
BlunderingFool
30 Jan 2014, 23:22Okay so looking at that code for a little bit (As well as sorting some things out in the real world) I can report I have absolutely no idea how to use the code, even if it is there.
HegemonKhan
31 Jan 2014, 00:16Creating your own "health" (life~HP) Attribute:
In the GUI~Editor mode:
on the left side (left pane) is the "tree of stuff", click on one of these (for this example, I'll use "player"):
game
player (or whatever you renamed as your default Player Object)
(or your own added~created "whatever" Player Object)
so that it is highlighted.
this then causes further details~options of that highlighted thing (game or player or your own custom Player Object), to show up on the right side (right pane).
on this right side (right pane), click on the Attributes (Tab), which will display its options now.
first, we're going to "create" (add) your 2 "hit points~HP" stats (current hp and maximum hp):
click on the "Add" button in the Attributes box at the bottom (not the Status Attributes box at the top), and name it as (let's call it as ~ I'm using my naming system for this example):
current_hit_points_integer
once you named it, you can see and change its settings below, which we want as:
Type (the small drop down box): int (integer)
and then the "Value" box will change for the selected type, and in the Value box we'll put:
9999
now do this again, adding in a new Attribute, named:
maximum_hit_points_integer
Type: int
Value: 9999
secondly, we're adding in another (a 3rd) attribute which will combine the two attributes (current hp and maximum hp) into a single attribute:
(conceptually:)
(HP: current hp / maximum hp)
(HP: 9999/9999)
(HP: 5000/9999)
(HP: 0/9999 = you're dead)
and do this one more time, your 3rd Attribute named:
hit_points_integer
but of a different type of Attribute, a "string" type:
Type: string
and it's different type of Value:
9999/9999
we've now made our three Attributes for the (example) "player" Player Object:
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (1) Name: current_hit_points_integer
Attribute (1) Type: int
Attribute (1) Value: 9999
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (2) Name: maximum_hit_points_integer
Attribute (2) Type: int
Attribute (2) Value: 9999
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (3) Name: hit_points_integer
Attribute (3) Type: string
Attribute (3) Value: (see below)
HP: 9999/9999
thirdly, let's now create (add) the status attribute, which will cause our 3rd attribute to show up, displaying itself, during game play in the right pane:
let's now set (add) the Status Attributes:
we do the same thing, except we click on the "Add" for the Status Attributes box at the top:
player (Player Object) -> Attributes (Tab) -> Status Attributes -> Add ->
Name: hit_points_integer
Field...(whatever it's called) : !
fourth, and lastly, we need two more special attributes (or we can create a Turnscript to do this too, but let's ignore that for this post, obviously), so that when our current hp and maximum hp change, the status attribute (the displayment during the game) will show that change:
now, we just need to add in two more Attributes...
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (4) Name: changedcurrent_hit_points_integer
Attribute (4) Type: script
Attribute (4) Value: (see below)
run as script -> add a~new script -> Variables -> Set a variable or Attribute -> (see below)
player.hit_points_integer = "HP: " + player.current_hit_points_integer + "/" + player.maximum_hit_points_integer
left of the equal sign:
player.hit_points_integer
right of the equal sign:
"HP: " + player.current_hit_points_integer + "/" + player.maximum_hit_points_integer
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (5) Name: changedmaximum_hit_points_integer
Attribute (5) Type: script
Attribute (5) Value: (see below)
run as script -> add a~new script -> Variables -> Set a variable or Attribute -> (see below)
player.hit_points_integer = "HP: " + player.current_hit_points_integer + "/" + player.maximum_hit_points_integer
left of the equal sign:
player.hit_points_integer
right of the equal sign:
"HP: " + player.current_hit_points_integer + "/" + player.maximum_hit_points_integer
------
now... see if you can do the same thing, for "mana~MP" stats...
--------
P.S.
try to do this step by step, and please post if you need any help, or for an explanation of what you're doing and~or how it is working.
let's go through this step by step, post as you need to, and I'll help you with whatever you need help and~or explanation of.
In the GUI~Editor mode:
on the left side (left pane) is the "tree of stuff", click on one of these (for this example, I'll use "player"):
A new game's default "Tree of stuff":
Objects
Game
Verbs
Commands
Room
Player
Functions
Timers
Walkthrough
Advanced
Included Libraries
English.aslx
Core.aslx
Templates
Dynamic Templates
Object Types
Javascript
Filter -> Show Library Objects
game
player (or whatever you renamed as your default Player Object)
(or your own added~created "whatever" Player Object)
so that it is highlighted.
this then causes further details~options of that highlighted thing (game or player or your own custom Player Object), to show up on the right side (right pane).
on this right side (right pane), click on the Attributes (Tab), which will display its options now.
first, we're going to "create" (add) your 2 "hit points~HP" stats (current hp and maximum hp):
click on the "Add" button in the Attributes box at the bottom (not the Status Attributes box at the top), and name it as (let's call it as ~ I'm using my naming system for this example):
current_hit_points_integer
once you named it, you can see and change its settings below, which we want as:
Type (the small drop down box): int (integer)
and then the "Value" box will change for the selected type, and in the Value box we'll put:
9999
now do this again, adding in a new Attribute, named:
maximum_hit_points_integer
Type: int
Value: 9999
secondly, we're adding in another (a 3rd) attribute which will combine the two attributes (current hp and maximum hp) into a single attribute:
(conceptually:)
(HP: current hp / maximum hp)
(HP: 9999/9999)
(HP: 5000/9999)
(HP: 0/9999 = you're dead)
and do this one more time, your 3rd Attribute named:
hit_points_integer
but of a different type of Attribute, a "string" type:
Type: string
and it's different type of Value:
9999/9999
we've now made our three Attributes for the (example) "player" Player Object:
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (1) Name: current_hit_points_integer
Attribute (1) Type: int
Attribute (1) Value: 9999
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (2) Name: maximum_hit_points_integer
Attribute (2) Type: int
Attribute (2) Value: 9999
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (3) Name: hit_points_integer
Attribute (3) Type: string
Attribute (3) Value: (see below)
HP: 9999/9999
thirdly, let's now create (add) the status attribute, which will cause our 3rd attribute to show up, displaying itself, during game play in the right pane:
let's now set (add) the Status Attributes:
we do the same thing, except we click on the "Add" for the Status Attributes box at the top:
player (Player Object) -> Attributes (Tab) -> Status Attributes -> Add ->
Name: hit_points_integer
Field...(whatever it's called) : !
fourth, and lastly, we need two more special attributes (or we can create a Turnscript to do this too, but let's ignore that for this post, obviously), so that when our current hp and maximum hp change, the status attribute (the displayment during the game) will show that change:
now, we just need to add in two more Attributes...
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (4) Name: changedcurrent_hit_points_integer
Attribute (4) Type: script
Attribute (4) Value: (see below)
run as script -> add a~new script -> Variables -> Set a variable or Attribute -> (see below)
player.hit_points_integer = "HP: " + player.current_hit_points_integer + "/" + player.maximum_hit_points_integer
left of the equal sign:
player.hit_points_integer
right of the equal sign:
"HP: " + player.current_hit_points_integer + "/" + player.maximum_hit_points_integer
player (Player Object) -> Attributes (Tab) -> Attributes -> Add ->
Object (1) Name: player (for an example of a choosen~highlighted Player Object)
Attribute (5) Name: changedmaximum_hit_points_integer
Attribute (5) Type: script
Attribute (5) Value: (see below)
run as script -> add a~new script -> Variables -> Set a variable or Attribute -> (see below)
player.hit_points_integer = "HP: " + player.current_hit_points_integer + "/" + player.maximum_hit_points_integer
left of the equal sign:
player.hit_points_integer
right of the equal sign:
"HP: " + player.current_hit_points_integer + "/" + player.maximum_hit_points_integer
------
now... see if you can do the same thing, for "mana~MP" stats...
--------
P.S.
try to do this step by step, and please post if you need any help, or for an explanation of what you're doing and~or how it is working.
let's go through this step by step, post as you need to, and I'll help you with whatever you need help and~or explanation of.