Mystic Software Forums
Mystic Software => General Discussion => Topic started by: PROJECTBENTLY 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?
-
Uhg! Even I know this! First, go to "Edit Main File", and go to "Startup Info"
and then make a program simaler to this.
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"?
-
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.
-
Nah, Dude Man.
newPlyr() is probably the most effective function to use.
-
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...
#Newplyr("car.tem")
#DestroyItem(slotX)
and when he exits the car
#Newplyr("pat.tem")
#CreateItem("car.itm", slotX, x!, y!)
-
If you want the car graphic to be an item, why not just erase and put?
-
Arrg! I'm confused here. I quit! Sad
-
C'mon Dude Man! This is the simplest RPG Code question ever!
-
Oh, I thought he ment some car program like in GTA or something. Just leave me to my constant tiredness and confusion.... -_-
-
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:
#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):
#if(incar!==1)
{
#createitem("car.itm",car!)
#putitem(car!,playerX[0]!,playerY[0]!,playerLayer[0]!)
#newplyr("yournormalcharacter.tem")
#walkspeed("slow")
#incar!=0
}
-
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.
-
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.