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

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« on: February 18, 2004, 09:36:10 AM »
I need to know how to put and use airships in a game with RPG Toolkit 2. I'm not a good programmer so anyone out there , if you could help it would be greatly appreciated. Also I need to know how to count items and then progess. I tried doing 6 #if statements but it failed. So if you could, I'd appreciatete it.
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Spyder

  • Member
  • *
  • Posts: 1695
    • View Profile
    • http://www.mysticsoftware.net
(no subject)
« Reply #1 on: February 18, 2004, 09:37:57 AM »
What do you mean by "count items and then progress"? Progress to what?
« Last Edit: December 31, 1969, 06:00:00 PM by Spyder »

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #2 on: February 18, 2004, 09:47:06 AM »
I put the programme in like this:

#countitem("object",name)
I did this six times
#if (no1!==3)
 {
 #if (no2!==3)
  {
  #if (no3!==3)
   {
   #if (no4!==1)
    {
    #if (no5!==1)
     {
      #if (no6!==1)
       {
       #next!=1
       }
}
}
}
}
}

#if (next!=1)
   {
   #day!=1
                {
It wont work and I can't see why
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Cesque

  • Member
  • *
  • Posts: 2178
    • View Profile
    • http://cesque.mysticsoftware.net
(no subject)
« Reply #3 on: February 18, 2004, 09:50:49 AM »
#itemcount for different default items...

Progress? You can add #progress!=progress+(number) in parts of game, then add some calculation to count this as percentage of maximum progress possible (100%) or simply make 100 progress points in total.

Airships? Get some plugins, heh... It's virtually impossible in default tk, if they have to land in all places on map (and if map consists of more than 1 board).
« Last Edit: December 31, 1969, 06:00:00 PM by Cesque »
TKGB cancelled Spyder.

Bastard.

Cesque

  • Member
  • *
  • Posts: 2178
    • View Profile
    • http://cesque.mysticsoftware.net
(no subject)
« Reply #4 on: February 18, 2004, 09:52:18 AM »
Yeah, I see you've posted code, but it's absolutely senseless. I get only the part with counting items, what is beyond sounds like no cosmos to me.
« Last Edit: December 31, 1969, 06:00:00 PM by Cesque »
TKGB cancelled Spyder.

Bastard.

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #5 on: February 18, 2004, 09:54:21 AM »
The airships would only be on one board and start and finish at certain points (airstations or the like)
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Spyder

  • Member
  • *
  • Posts: 1695
    • View Profile
    • http://www.mysticsoftware.net
(no subject)
« Reply #6 on: February 18, 2004, 10:08:47 AM »
Quote from: Edenane,Wednesday, February 18, 2004 8:47 AM
I put the programme in like this:

#countitem("object",name)
I did this six times
#if (no1!==3)
 {
 #if (no2!==3)
  {
  #if (no3!==3)
   {
   #if (no4!==1)
    {
    #if (no5!==1)
     {
      #if (no6!==1)
       {
       #next!=1
       }
}
}
}
}
}

#if (next!=1)
   {
   #day!=1
                {
It wont work and I can't see why
What doesn't work? I'm guessing your using MrG's plugin to count items, correct? Are you using TK2 or TK3? Also, if this code was cut and pasted, your missing the $ after "name" in the #CountItem command...if that's supposed to be a variable at any rate. I'm not too familiar with plugin commands, especially that one, sorry. As far as airships. By saying they land at air stations, does that mean you don't actually control them? If so, you could just make an airship item and use the #PushItem command or something. You could also try making a character file that uses airship graphics instead of character graphics, and then use #NewPlayr, or #RemovePlayer and #AddPlayer by sending the character to layer 8 so there wouldn't be any solid tiles to run into or something by using the #Send command.
« Last Edit: December 31, 1969, 06:00:00 PM by Spyder »

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #7 on: February 18, 2004, 10:37:40 AM »
I mean #itemcount not #countitem i got mixed up but it still doesn't work I have TK2 It wasn't copied and pasted, i wrote it as an example
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #8 on: February 18, 2004, 03:16:33 PM »
hmm...im not familiar with G's plugin (i dont use any plugins at all) but i wouldnt use the default items (i hate them) so i just use a variable (potion!=2 or whatever)
but then you would have to make a battle system and menu system
« 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 #9 on: February 18, 2004, 03:20:37 PM »
Quote from: Edenane,Wednesday, February 18, 2004 9:36 AM
I need to know how to put and use airships in a game with RPG Toolkit 2. I'm not a good programmer so anyone out there , if you could help it would be greatly appreciated. Also I need to know how to count items and then progess. I tried doing 6 #if statements but it failed. So if you could, I'd appreciatete it.
Airships can be tricky, but they're not impossible.  In the simplest case, you're going to do a #newplyr to change the character graphics to the ship graphics and a #putplayer command to send the player to a new layer (you don't want things that were solid while on the ground to be solid when you're on the ship):

Code: [Select]
#newplyr("airship.tem")
#putplayer(playerHandle[0]$,playerX[0]!,playerY[0]!,2) *We'll assume the layer 2 is the "air" layer

And to land:
Code: [Select]
#newplyr("hero.tem")
#putplayer(playerHandle[0]$,playerX[0]!,playerY[0]!,1) * 1 is the ground layer

Now, of course all this does is change the hero into a flying ship and back again at will.  If you want to leave the ship and have it stay there for you to come back to later, you'll have to "remember" where you parked it.  Your landing method would look something like this:

Code: [Select]
#newplyr("hero.tem")
#putplayer(playerHandle[0]$,playerX[0]!,playerY[0]!,1)
*Remember where we put it
#airship_X_location!=playerX[0]!
#airship_Y_location!=playerY[0]!
#airship_board$=BoardTitle[8]$ * You have to get creative here, since there's no variable that contains the name of the current board.   One way is to fill in the name of the current board as one the layer names in the board editor.
#layerput(airship_X_location!,airship_Y_location, 2, "airship.gph") * set down an image of the parked airship on the board

Now to get on the airship, you need to check if the player is standing over it:
Code: [Select]
#if(airship_board$=BoardTitle[8]$)
{
  #if(airship_X_location!=playerX[0]!)
  {
    #if(airship_Y_location!=playerY[0]!)
    {
      #newplyr("airship.tem")
      #putplayer(playerHandle[0]$,playerX[0]!,playerY[0]!,2)
    }
  }
}

Also, you'll probably want the player to be able to see the airship if you leave the board and come back.  In your warp programs, you'll have to do something like this:

Code: [Select]
#send( ... )
#if(airship_board$=BoardTitle[8]$)
{
#layerput(airship_X_location!,airship_Y_location!, 2, "airship.gph")
}
#done


As for your second question, I'm not sure what you mean.  Calling

#itemcount( "potion.itm", dest!)

will make the variable dest! equal the number of potions in the player's inventory.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #10 on: February 18, 2004, 04:03:04 PM »
The things I need for the item, I mean my person has to have, say, 3 potions, 3 high potions, 1 elixir, 1 megalixir and so on to continue on the storyline I have. As for the airship, thank you very much. Also in a reply to an earlier question I don't nor ever will use a plugin, I just wrote somthing wrong. On the page, not the code.
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #11 on: February 18, 2004, 05:28:04 PM »
Okay, then you'll have something like:

#itemcount( "potion.itm", potions!)
#itemcount( "highpotion.itm", highpotions!)
#itemcount( "elixir.itm", elixirs!)
#itemcount( "megaelixir.itm", megaelixirs!)

#if(potions!>=3)
{
#if(highpotions!>=3)
{
#if(elixirs!>=1)
{
#if(megaelixirs!>=1)
{

*"Okay to pass" code here

}
}
}
}
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #12 on: February 18, 2004, 05:51:48 PM »
It must have been a grammar mistake then. Thank you to everyone who helped, expecially Xorlax & Spyder.
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #13 on: February 19, 2004, 06:44:39 AM »
i hate plugins  :blink: ... :ph34r:
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

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

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #14 on: February 21, 2004, 04:38:13 PM »
I got both questions answered. Here's another:
I have random battle sequences on a few boards. And the whole game works fine. Then I saved it as a TPK file. And the random battles don't have any enemy graphics. However, they do have graphics when I use the #fightenemy command. What can I do?
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »