Author Topic: (no subject)  (Read 14846 times)

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« on: July 02, 2004, 12:05:17 AM »
I've been working on my menu system, but I've come to a problem... I'm trying to make it so every character has their own item inventory, and so, I've done this:

#If (kail!=1)
   {
   #p!=p!+1
   #person[p!]$=KAIL
   }


Now, person1$=KAIL, and so, because this is true now (with kail!=1 of course), I'm making it so the player can selecton one of the charater's iventory.  The problem now, is that I'm also trying to show their inventory when they are highlighted (but not selected), and so, I must access the item depending on the player. So I have set it up like this:

#char$=person[p!]$  *This makes the equation simplify. When pressed left or right, it changes p!.
#iy!=35.7
#FontSize(8)
#ColorRGB(255,255,255)
#If (potion[char$]!>=1)
   {
   #i!=i!+1
   #itemload[i!]$="#Load_Potion()"
   #itemuse[i!]$="#Use_Potion()"
   #iy!=iy!+1.25
   #Text(29,iy!,"Potion                   <potion[char$]!>")
   #Titem!=Titem!+1
   }

But, instead of being able to make potionKAIL! the variable, it seems to be unable to do this (with potionKail! equal to something).  This would also change depending on which character it seleced, like potionFIONA!.

So, does anyone know what I am doing wrong in this? :unsure:
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Asimir

  • Member
  • *
  • Posts: 333
    • View Profile
(no subject)
« Reply #1 on: July 02, 2004, 08:44:14 AM »
#person[p!]$=KAIL should be  #person[p!]$="KAIL"

and the variable you use would be potion["KAIL"]!, not potionKAIL!
« Last Edit: December 31, 1969, 06:00:00 PM by Asimir »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #2 on: July 02, 2004, 10:05:25 AM »
well, thats the thing....i had tried that too....but it wouldn't work....
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #3 on: July 02, 2004, 02:26:55 PM »
Quote from: DarkElite,Thursday, July 1, 2004 11:05 PM
But, instead of being able to make potionKAIL! the variable, it seems to be unable to do this (with potionKail! equal to something).  This would also change depending on which character it seleced, like potionFIONA!.
Could you expand on this description a bit more?

What you have looks correct.  Are you saying potion[char$]! isn't the value it should be?  That would suggest that char$ isn't correct, which means person[p!]$ isn't correct, which suggests the value of p! may be off (could be a simple off-by-one error, which I do all the time, heh...)  In your program, check the values of these variables with #mwins when testing to see if they are what you expect them to be.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

AlienDude

  • Member
  • *
  • Posts: 605
    • View Profile
    • http://www.taralax.com
(no subject)
« Reply #4 on: July 02, 2004, 03:47:28 PM »
Cant you just set up separate arrays for each of the characters:

#charitem[x!]$="blah.itm"
...

and make methods that edit these arrays and tidy them up ie move items to the higher position if a higher slot opens up, etc.

more later, brain needs break after accessing old HDD   Wink
« Last Edit: December 31, 1969, 06:00:00 PM by AlienDude »
Quote
May your star always be good to you and may your travels be swift.
 
- Traveller Farewell
(adapted from the Necroscope series by Brian Lumley)

Taralax Studios BEING REBUILT GENOME BY GENOME! Wink
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Spyder

  • Member
  • *
  • Posts: 1695
    • View Profile
    • http://www.mysticsoftware.net
(no subject)
« Reply #13 on: July 05, 2004, 12:50:00 PM »
I wonder if that's what's causing it then, #SetImageTransparent.
« Last Edit: December 31, 1969, 06:00:00 PM by Spyder »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #14 on: July 05, 2004, 02:50:30 PM »
hmm...posibly...

this is getting happy......now there's something else....when ever i have a selection that only allows the user to press left, right, confirm, or back butons....it wont let the cursor moves....also, if they press something besides the allowed buttons, it will screw up.....(i have something that check if its not any of the buttons used to...)
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!