Item Equip Glitch
jmnevil54
30 May 2017, 22:46So I was trying to make a new game with ThePixie's zombie tutorial. For some reason, when I copy and paste the game in there now, it won't equip right. The listalias isn't displayed, and all it says is equipped. Then when I unequip it and try equipping it again, the name has disappeared completely, and it won't equip. The same thing happens when I try pasting from my Zombie 2 game. The weird thing is, this doesn't happen when I'm using my zombie 2 game.
Any help is appreciated. I just want to equip and unequip items without my items disappearing.
I'd also like help with these healing commands, as I still can't get it to work. (Not when it's in an item object space, and not when I type it out)
Heal Potion #object#
if (player.potion > 0) {
if (player.hitpoints < player.max) {
player.hitpoints = player.hitpoints + 60
}
}
Heal Hyper Potion #object#
if (player.hyper_potion > 0) {
if (player.hitpoints < player.max) {
player.hitpoints = player.max
}
}

DarkLizerd
31 May 2017, 19:40your code works fine...
but after you drink the potion, you need a check to see if player.hitpoints > player.max
jmnevil54
01 Jun 2017, 03:14It turns out I was messing with the code and deleted a few variables for the player.max.
As for the item glitch, this might just be a computer error with quest.
jmnevil54
01 Jun 2017, 03:19This is what it looks when it's equipped.
http://i.imgur.com/zCczRNJ.png
This is what it looks like when it's not equipped.
http://i.imgur.com/hsevJO9.png

DarkLizerd
01 Jun 2017, 03:47It happens... been there too many times my self...
jmnevil54
01 Jun 2017, 22:34Sorry. I've been working on it for days and I can't figure out what the problem is.
hegemonkhan
02 Jun 2017, 07:37you aren't displaying its alias...
to display it's alias:
when equipping/equipped:
this.default_alias = this.alias // for example: this.default_alias = "katana"
this.alias = GetDisplayAlias (this) + " (equipped)" // for example: this.alias = "katana (equipped)"
when unequipping/not-equipped:
this.alias = this.default_alias // for example: this.alias = "katana"
here's Chase's 'wearables' library:
http://textadventures.co.uk/forum/samples/topic/2901/extended-wearables-library
ask if you got any questions
jmnevil54
03 Jun 2017, 02:57Fixed it. (Changed listalias to alias)