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

PROJECTBENTLY

  • Member
  • *
  • Posts: 1
    • View Profile
(no subject)
« on: February 22, 2005, 07:48:18 PM »
Does anyone know a simple car code in which cars will "wander around"on the streets yet you can still get into them? And out of them.

If you can't do you think I should have parked cars be new players and moving cars be npc?
« Last Edit: December 31, 1969, 06:00:00 PM by PROJECTBENTLY »

Aminaga

  • Member
  • *
  • Posts: 1665
    • View Profile
    • http://ultimategamingproductions.net
(no subject)
« Reply #1 on: February 22, 2005, 08:01:03 PM »
Uhg! Even I know this! First, go to "Edit Main File", and go to "Startup Info"
and then make a program simaler to this.

Code: [Select]
Only type this if you just wan't to change the graphics:

#Newplyr("car.tem")

Do this if you wan't to make a whole different player:

#AddPlayer("car.tem")
#RemovePlayer("aminaga.tem")

Then choose "Save As", and save it as like "get into car" or something.

P.S. Does your game have anything to do with the game: "Mini Cars"?
« Last Edit: February 22, 2005, 08:02:59 PM by Aminaga »
<span style=\'font-size:16pt;line-height:100%\'><a href=\'http://ultimategamingproductions.net\' target=\'_blank\'>WWW.ULTIMATEGAMINGPRODUCTIONS.NET</a></span>

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #2 on: February 22, 2005, 08:34:08 PM »
Don't forget to #DestroyItem(1).  And once he get's out of the car, then #CreateItem("car.itm", 1)

Note I may have messed up on the create item command.
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Colin

  • Member
  • *
  • Posts: 299
    • View Profile
(no subject)
« Reply #3 on: February 22, 2005, 08:36:31 PM »
Nah, Dude Man.

newPlyr() is probably the most effective function to use.
« Last Edit: December 31, 1969, 06:00:00 PM by Colin »
— Colin

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #4 on: February 22, 2005, 08:47:19 PM »
Well yeah, that two. But I mean. He'll go to the car, and the car will still be parked, but he'll be driveing to, and that's no good.

So the code should look like...

Code: [Select]
#Newplyr("car.tem")
#DestroyItem(slotX)

and when he exits the car

Code: [Select]
#Newplyr("pat.tem")
#CreateItem("car.itm", slotX, x!, y!)
« Last Edit: February 22, 2005, 08:51:42 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Colin

  • Member
  • *
  • Posts: 299
    • View Profile
(no subject)
« Reply #5 on: February 23, 2005, 12:25:15 AM »
If you want the car graphic to be an item, why not just erase and put?
« Last Edit: December 31, 1969, 06:00:00 PM by Colin »
— Colin

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #6 on: February 23, 2005, 02:59:43 PM »
Arrg! I'm confused here. I quit! Sad
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Aminaga

  • Member
  • *
  • Posts: 1665
    • View Profile
    • http://ultimategamingproductions.net
(no subject)
« Reply #7 on: February 23, 2005, 03:51:10 PM »
C'mon Dude Man! This is the simplest RPG Code question ever!
« Last Edit: December 31, 1969, 06:00:00 PM by Aminaga »
<span style=\'font-size:16pt;line-height:100%\'><a href=\'http://ultimategamingproductions.net\' target=\'_blank\'>WWW.ULTIMATEGAMINGPRODUCTIONS.NET</a></span>

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #8 on: February 23, 2005, 06:08:16 PM »
Oh, I thought he ment some car program like in GTA or something. Just leave me to my constant tiredness and confusion.... -_-
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #9 on: February 23, 2005, 08:47:01 PM »
I would do something like this:

 - Give the car the regular old wander.prg as its runtime program (actually a car wandering around aimlessly crashing into things wouldn't be very realistic, heh...  You'll probably want to give it a set path)

 - As its activation program, give it this, assuming the car is item 0:

Code: [Select]
#eraseitem(0)
#destroyitem(0)
#newplyr("car.tem")
#walkspeed("fast") * or whatever in TK3...
#incar! = 1

Now you'll probably want to get out of the car at some point.  Set this as a run time program when you press the "E" key (for Exit car, or whatever you want):

Code: [Select]
#if(incar!==1)
{
#createitem("car.itm",car!)
#putitem(car!,playerX[0]!,playerY[0]!,playerLayer[0]!)
#newplyr("yournormalcharacter.tem")
#walkspeed("slow")
#incar!=0
}
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

Colin

  • Member
  • *
  • Posts: 299
    • View Profile
(no subject)
« Reply #10 on: February 23, 2005, 10:07:01 PM »
The whole walkspeed thing is now obsolete. GameSpeed included.

All players and items can have their own speeds. Smile

GameSpeed is now used as an overall control thing, for menus and whatnot.
« Last Edit: December 31, 1969, 06:00:00 PM by Colin »
— Colin

Aminaga

  • Member
  • *
  • Posts: 1665
    • View Profile
    • http://ultimategamingproductions.net
(no subject)
« Reply #11 on: February 24, 2005, 06:30:48 PM »
Projectbently(or whatever you're name is.): Ummm, don't listen to me, Dude Man, etc. Listen to Xorlak, and his spy, KSNiloc. Now they're REALLY good.
« Last Edit: December 31, 1969, 06:00:00 PM by Aminaga »
<span style=\'font-size:16pt;line-height:100%\'><a href=\'http://ultimategamingproductions.net\' target=\'_blank\'>WWW.ULTIMATEGAMINGPRODUCTIONS.NET</a></span>