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

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« on: October 10, 2003, 09:32:48 AM »
I am trying to create a boat for my game. I can't figure out how I would check if the player is next to water and can use the ship. I want this to be a runtime program that they can only use when next to water and not in dungens and things like that. Also if there is a way the change them back when they get on land. If anyone can help mw then thanks in advance.
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #1 on: October 10, 2003, 01:40:16 PM »
Hmm, do you mean that you want the boat-thing to activate when the player steps out in the water or on to a boat? Or do you want some sort of button or command or item or something that, when used, should turn the whole game into some sort of boat mode? Could you tell us what you specifically want to happen?
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Mark of the Dragon

  • Member
  • *
  • Posts: 1658
    • View Profile
    • http://www.geocities.com/zeroentity01/
(no subject)
« Reply #2 on: October 10, 2003, 02:11:54 PM »
Dude, set water on it's own layer, and create a player and an item, both called "BOAT"

When the player steps onto the water, check for the boat item. If the boat is in the inventory, use #NewPlyr to show the boat.

In the same programs, check for the who player[0] is.

#If(playerhandle[0]$~="Boat")
{
#Itemcount("boat.itm",boat!)
#If(boat!=1)
{
#NewPlyr(Boat)
}
}
#If(playerhandle[0]$="Boat")
{
#NewPlyr(*put main character's file here*)
}
« Last Edit: December 31, 1969, 06:00:00 PM by Mark of the Dragon »
<center>
Roy Mustang



Yeah...that sounds like me <_<

<center>
You were born in the land of Warrior Pride. You live to fight, you have a strong spirit, courage and bravery. Strong lord! Unsheath thy sword, rush into war and strip the enemy of his flesh down to the core.


Umm...yeah

Cuzit

  • Member
  • *
  • Posts: 487
    • View Profile
(no subject)
« Reply #3 on: October 10, 2003, 10:12:28 PM »
Cool, I've been wondering that
« Last Edit: December 31, 1969, 06:00:00 PM by Cuzit »

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #4 on: October 13, 2003, 09:31:25 AM »
Your plan would require the placement of many, many, many programs around a large body of water. What I need is a way for the program to be a RUNTIME program. For example, the player walks up to some water, not on a different layer as there is no point in this, and presses b (for boat) or some other key. Following this the player will be trans ported to layer 2 (or another layer) where the solid and normal tiles are changed so they can only move on the water. Simple? Sure except for the whole RUNTIME part. I need a way to check if the player is next to water.

Any idiot could make a program to check and see if the player has a boat and put him in it. Again the flaw in this is to either put a program around all water, which is time consuming and not practical, or make it so they can only enter the water in designated places, which is a better plan yet does not allow for flexabilaty.

for help i think you.

By the way "Mark of the Dragon" How long have you been programing, four maybe five days now.
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #5 on: October 13, 2003, 10:14:03 AM »
Actually, I like the idea with different layers.

One layer could be the normal ground, another could be the beach, and a third could be the water. And when you press b or something, the program could check which layer you are on and if you got a boat or not. If all theese conditions are true, then the program could change the player graphics, and move the player to the water layer.

Of course, this requires a command that can check where the player is, not only the layer since it must know where on the water layer to send the player. I have not found any command like that, but I'm sure there must be one somewhere.

And then of course, how should the player get out of the boat? I don't think it's a good idea to make him push a button when he hits land, that just doesn't seem good. I think the only way to go around that is to place programs around the land.

Oh, and Mark of the Dragon, about your program, I think you need to make sure that the program ends or somehow jumps over the part "Change boat into main character" if it does the part "Change main character into boat", otherwise it would just change the character into a boat and back again.
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #6 on: October 15, 2003, 09:22:56 AM »
Well for anyone who has even read this thread and was wondering if anyone would come up with anything here it is

********************************************************
*This program will check to see if the player has an item boat.item*
*And if such an item is in the players inventory then it will change**
*The players graphics to that of a boat************************
********************************************************

#If(IAmABoat! == 1)
{
   #NewPlyr("player1.tem")
    *Send(TBD) *Place board nbame and player cordanents here
   #IAmABoat! = 0   
   #End()
}

#ItemCount(boat.itm, Boat!)

#If(Boat! >= 1) *>= because they might have more than one, you never know
{
   #Newplyr("boat.tem")
    *#Send(TBD) *Place board name and player cordanents here
   #IAmABoat! = 1
}

#If(Boat! <= 0)
{
   #Mwin("You don't have a boat yet.")
   #Mwin("Come back when you have one")
   #Wait(A$)
   #Mwincls()
}

Basicly this program can be placed on a dock or somewhere else where the player can enter the water. You don't have to set tiles on another layer all you have to do is go to another layer like 8 and set the tile types to normal for the water, solid for the ground, and under for briges of something like that. Now under the first if statment set the #Send command to send the player to your normal layer most likely 1 and onto the land. Under the next If statment set the #Send command to send the player to the water layer, 8 in this example. All it requires is a coupe seconds to type in the chords.

There you all go. Simple but i would still like to have a runtime program...too bad though.
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« Reply #7 on: October 17, 2003, 08:58:02 AM »
Okay, if I'm not totally misstaken, a runtime program is one that starts when you press a specific button, and you choose the button and program in the main editor, right? Well, if we make an island board, and make the edges (the beach or cliffs or whatever) on the island layer 7 seven, and the edge beetwen the cliffs and the rest of the stairs between the two layers, and layer eight should be the water, the boat layer, with the island being solid and everything. Now, when we start our runtime program, it should check first of all if the player has any boat (#Itemcount). Next, it should check on which layer the player is (There's got to be a plugin like that somewhere, it has to!), and if the player is on layer seven (beach), it could change the player graphics (#Newplyr), and send it to the same coordinates as the player was shen activating th program, but to layer eight instead.

And in the program, it should also be included something to check if the player is already sailing, and perhaps some way of getting of the boat. I think that could be useful.
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Dont_Think_So

  • Member
  • *
  • Posts: 76
    • View Profile
(no subject)
« Reply #8 on: October 18, 2003, 08:44:36 AM »
OR you could do something like I did with advanced items (available at the shack).  It checks which tile is directly in front of the player, then runs the code.
« Last Edit: December 31, 1969, 06:00:00 PM by Dont_Think_So »

Cuzit

  • Member
  • *
  • Posts: 487
    • View Profile
(no subject)
« Reply #9 on: October 18, 2003, 10:50:15 PM »
It would be a whole lot easier if you just made a town with a dock, then just sent them back out to the overworld, no? Anyway, we now have quite a few millions of choices to choose from for boat commands.
« Last Edit: December 31, 1969, 06:00:00 PM by Cuzit »