Author Topic: Crimson warfare the ti game  (Read 51624 times)

0 Members and 3 Guests are viewing this topic.

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Crimson warfare the ti game
« Reply #105 on: November 25, 2009, 12:33:54 am »
me too =D, but i think we're getting our motivations up, all we need is to get some time (lots of hw atm) to do so.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Crimson warfare the ti game
« Reply #106 on: November 25, 2009, 09:39:39 am »
Current idea: Im taking away the Anoying List. and just keeping the Str1.. The syntax would be similar to the Menu( Function except.. mine is CrimMenu(Xcoordinate,Ycoordinate,"Title",Sprite#,"Option#1",Sprite#,"Option#2,Sprite#.. ect.

Right now, I have InString(.. But i dont know how to get the # of words between them.. Any ideas?
I'm not sure what you mean, but mabey something like this:
-1->B:0->A
Repeat not(Ans
B+1->B
inString(Str1, "," ,A+1
End

Now B contains the number of commas in Str1.

It's cool.  I think this was the first game that I ever helped with on UTI...

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Crimson warfare the ti game
« Reply #107 on: November 25, 2009, 07:12:45 pm »
Lol, this was the first game i helped out with too =D. and uhm.. couldn't u just do.. inString(Str1,",")->B ... to clear up my question.

Say... i have.. the words  "Hello,4,option1,1,option2,2->Str1.   How would i be able to find out how many letters or characters are between the first and 2nd comma.. the 2nd and 3rd comma.. ect.  (if this cannot be done, il have to make my Menu with Strings and Lists again.) T_T

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Crimson warfare the ti game
« Reply #108 on: November 25, 2009, 07:44:21 pm »
by subtracting the first answer from the second
Eg:
Code: [Select]
inString(Str1,",")->B
inString(Str1,",",B)->C
C-B->A
A stores the amount of characters in between the two commas
/e

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Crimson warfare the ti game
« Reply #109 on: November 25, 2009, 11:14:06 pm »
k, i just tried reading the manaul, and i cant figure out what the inString(Str1,",",-->B<--) i cant figure out what the B does.. X_X can u plz explain =D thanks Eeems! now i can continue the menu hehe.. Many thanks again.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Crimson warfare the ti game
« Reply #110 on: November 25, 2009, 11:54:30 pm »
Oh it searches for the string in the string from the place in b and on. (oops you should chane the b to B+1 actually otherwise you would just be looking at the same place)
/e

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Crimson warfare the ti game
« Reply #111 on: November 26, 2009, 12:13:04 am »
so.. InString(Str1,",")->B //tells me how many ","'s ther are..
and.InString(Str1,",",B+1) // tells me...???? i really cant tell what that b is really doing..

OH CRAP, i thought it tells me how many"," there were... =P okay, now i know what InString does.. but i still dunno what the 3rd arguement is.. (B+1)
« Last Edit: November 26, 2009, 12:17:21 am by Ti-newb »

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Crimson warfare the ti game
« Reply #112 on: November 26, 2009, 12:48:50 am »
It is where it starts looking to find the string you are looking for, kind of like the starting point.
/e

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Crimson warfare the ti game
« Reply #113 on: November 26, 2009, 01:07:21 am »
ic ic!!! thank you Eeems

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Crimson warfare the ti game
« Reply #114 on: November 26, 2009, 02:04:11 am »
No problem, always glad to help :)
/e

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Crimson warfare the ti game
« Reply #115 on: November 26, 2009, 04:34:37 pm »
sweet thats good to know for me

@ Ti-Newb what did you want me to explain again i forgot (what we talked about over irc?????)


Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Crimson warfare the ti game
« Reply #116 on: November 27, 2009, 12:00:27 am »
Eeems answered it

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Crimson warfare the ti game
« Reply #117 on: November 27, 2009, 10:49:54 am »
oh i meant about the engine and stuff you said you were confused but i forgot exacly what you weanted info about

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Crimson warfare the ti game
« Reply #118 on: January 09, 2010, 01:10:02 pm »
Here it is.. -Without Sprites function-...

***Runs on CelticIII*** !!!!!!!!!!!


To use: Type in your Coordinates into List1.. so if u wanted the menu to appear at.. x=5 and y=7.. you'd do.. {5,7... After that, put in the Mode you'd like the Menu to do..
Mode 1: Clr Draw and display a Box around your Options
Mode 2: Clr Draw and Dont display Box around your options (More Dos-ish)
Mode 3: Dont Clr Draw and Display Box

so basically, you'd need.. {Xcoordinate,Ycoordinate,Mode->L1

Then, you need to type down your options that need to be displayed into Str1.. but seperated options with a comma.. Example:

"START,CREDITS,QUIT->Str1

BTW This is a Subprgm, so ur supposed to stick it into ur Main Prgm..

-Your Codes-
-More of your Codes-
{Xcoordinate,Ycoordinate,Mode->L1
"START,CREDITS,QUIT  (Yes, you dont have to do ->Str1 AS LONG AS ITS RIGHT b4 PrgmMenu!!!
PrgmMenu  
-Your Codes
-More of your Codes

Then just Run the prgm and ur good.


!! IMPORTANT !! The option you have selected will be saved in the Variable A and E. So if u picked the 2nd option, A would = 2
« Last Edit: January 09, 2010, 02:05:51 pm by Ti-newb »

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Crimson warfare the ti game
« Reply #119 on: January 09, 2010, 01:43:01 pm »
You could replace the first line of the menu program with these lines:
:Ans->Str1  //Store Ans to Str1
:inString(Ans,"}->A  //Find where the list ends
:expr("{"+sub(Str1,1,Ans->L1  //Put the list in L1
:sub(Str1,A+1,length(Str1)-A)+",->Str1  //Put the string in Str1

You would pass it like:
"20,10,3}Option1,Option2,Option3
In other words: " X , Y , Option } Name_of_option_1 , Name_of_option_2 , Name_of_option_3...

What do you think?
By the way, the Menu program looks great!
« Last Edit: January 09, 2010, 01:43:22 pm by ztrumpet »