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

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #30 on: July 07, 2004, 11:26:24 AM »
anyone can learn it!

Spyder, i see your viewing this....check your PM's....
« Last Edit: July 07, 2004, 11:26:41 AM 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 #31 on: July 07, 2004, 11:55:22 AM »
Quote from: DarkElite,Wednesday, July 7, 2004 8:19 AM
Heres the code you wanted Xorlak, I have it set up so that it checks for what the variable is out side of the #While loop so that I can animate a cursor....here's and example:
Uh oh, branches... (heh...)

It looks like the :itemselector branch gets hit if you press a wrong key, which is what you want.  But I'm guessing the program ends because of something in that branch.  You want nothing to happen when the user presses a wrong key, right?  Here's a quick re-write that does that and eliminates that final branch:

Code: [Select]
#a$=""
#arrowY!=i!*10+269
#SetImageTransparent("/Menu/Left_Vertical_Arrow1.gif",200,arrowY!,20,25,0,0,255)
#a!=75

#done!=0
#while(done!=0)
{

#While(a$="")
{
#a!=a!+1
#If (a!=150)
 {
 #SetImage("/Menu/UnDescription.gif",200,arrowY!,20,25)
 #SetImageTransparent("/Menu/Left_Vertical_Arrow2.gif",200,arrowY!,20,25,0,0,255)
 }
#If (a!=300)
 {
 #SetImage("/Menu/UnDescription.gif",200,arrowY!,20,25)
 #SetImageTransparent("/Menu/Left_Vertical_Arrow1.gif",200,arrowY!,20,25,0,0,255)
 #a!=1
 }
#Get(a$)
}

#If (a$=confirm$)
{
 #done!=1
 #RPGCode(itemuse[i!]$)
}
#If (a$="UP")
 {
 #done!=1
 #If (i!=1){#Branch (:itemselector)}
 #SetImage("/Menu/UnDescription.gif",200,arrowY!,20,25)
 #i!=i!-1
 #Branch (:itemselector)
 }
#If (a$="DOWN")
 {
 #done!=1
 #If (i!=Titem!){#Branch (:itemselector)}
 #SetImage("/Menu/UnDescription.gif",200,arrowY!,20,25)
 #i!=i!+1
 #Branch (:itemselector)
 }
#If (a$=back$)
 {
 #done!=1
 #SetImage("/Menu/UnDescription.gif",200,280,260,226)
 #SetImage("/Menu/UnDescription.gif",472,280,215,226)
 #Kill(i!)
 #Kill(Titem!)
 #Kill(itemuse1$)
 #Kill(itemuse2$)
 #Kill(itemuse3$)
 #Kill(itemuse4$)
 #Kill(itemuse5$)
 #Kill(itemuse6$)
 #Kill(itemuse7$)
 #Kill(itemuse8$)
 #Kill(itemuse9$)
 #Kill(itemuse10$)
 #Kill(itemuse11$)
 #Kill(itemuse12$)
 #Kill(itemuse13$)
 #Kill(itemuse14$)
 #Kill(itemuse15$)
 #Kill(itemuse16$)
 #Kill(itemuse17$)
 #Kill(itemuse18$)
 #Kill(itemuse19$)
 #Branch (:itemcheckstart)
 }

Quote
Xorlak, i need a lot of help understanding the 2D array thing....its really confusing...


Hmmm, actually you want to do something like this, right?

#item["Potion"][char$]!=1

That'd require a 2D map rather than a 2D array, but I think I can modify Asimir's code to support that:

Code: [Select]
* Asimir's modified code
#method NumMapIn(arrayname$,arrayx$,arrayy$,arrayvalue!)
{
 #command$ = "#" + arrayname$ + "." + arrayx$ + "." + arrayy$ + "! = arrayvalue!"
 #rpgcode(command$)
 #kill(arrayname$)
 #kill(arrayx$)
 #kill(arrayy$)
 #kill(arrayvalue!)
 #kill(command$)
}

#method NumMapOut(arrayname$,arrayx$,arrayy$,arrayvalue!)
{
 #command$ = "#arrayvalue! = " + arrayname$ + "." + arrayx$ + "." + arrayy$ + "!"
 #rpgcode(command$)
 #kill(arrayname$)
 #kill(arrayx$)
 #kill(arrayy$)
 #returnmethod(arrayvalue!)
 #kill(arrayvalue!)
 #kill(command$)
}

Now to do this:

#item["Potion"][char$]!=1

You would do:

#NumMapIn("item","Potion",char$,1)

And to get the value of that variable, you would do:

#NumMapOut("item","Potion",char$,dest!)

And dest! will be where to store the value of what you're looking for.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #32 on: July 07, 2004, 03:59:10 PM »
unfortunately...im not sure if that would work....it actually two variables.... #[itemname$][Gchar$]!  (both are in quotations...) and there is no item going before it....or wouold there have to be?
« Last Edit: July 08, 2004, 07:28:05 AM 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 #33 on: July 08, 2004, 09:33:38 AM »
That's just the name of the variable.  Just use the word "item" for all of them:

#NumMapIn("item",itemname$,Gchar$,1)
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #34 on: July 08, 2004, 11:11:19 AM »
so, that would mean that i could also just take out the item and have just a "" and it would just be (if itemname$="potion" and char$="Kail") potionKail!   ?
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

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

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #35 on: July 08, 2004, 04:27:01 PM »
oh! i get its code now!! all it is is a literal value thats turned into a code played out!! im so dumb!!  Laughing
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

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

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #36 on: July 08, 2004, 06:05:08 PM »
Even ME cud hav finded dat out! Laughing

Sorry, I didn't mean any ufence...errr...offenince...errr....god damn I can't spell...meh at least I'm close enough....
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #37 on: July 08, 2004, 09:35:04 PM »
heh, yeah i know...i didnt think of it because i had triedf something similar...and it didnt quite work....hmm..... (heh...)  Laughing
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

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

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #38 on: July 09, 2004, 10:14:38 AM »
Laughing LOL! Okay put the post DE just did, and put it right after my post at the top of the page...


Quote
I see...So yes, my dog, is indeed, a homosexual!


Quote
heh, yeah i know...i didnt think of it because i had triedf something similar...and it didnt quite work....hmm..... (heh...)  Laughing 
« Last Edit: July 09, 2004, 10:15:51 AM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Asimir

  • Member
  • *
  • Posts: 333
    • View Profile
(no subject)
« Reply #39 on: July 09, 2004, 12:50:45 PM »
Lots of people experiment Wink
« Last Edit: December 31, 1969, 06:00:00 PM by Asimir »

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #40 on: July 09, 2004, 04:24:36 PM »
You Know, probally nobody did, and you just ruined that joke for me. WHEN WILL YOU LEARN!
« Last Edit: July 09, 2004, 04:26:25 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #41 on: July 09, 2004, 06:08:12 PM »
hey xorlak...once i added that extra #while, it still seems to have the same problem....when you press something besides what you can, it will screw up...
« 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 #42 on: July 10, 2004, 02:25:07 PM »
Does it still end like before? It might be better for you send me the whole thing to look at, if you want.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #43 on: July 10, 2004, 04:53:34 PM »
do you want the images with it?
« 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 #44 on: July 11, 2004, 02:26:28 PM »
If you think they're neccessary.  ZIP it all up and email it to me.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »