Script help

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
Ongen
Ped
Ped
Posts: 1
Joined: 24 Nov 2010, 02:21
GH nick: Ongen

Script help

Post by Ongen »

Hello all! Im new to this forum and feel that I must ask a question. Hope it is not in the wrong forum part.

I have played gta2 since it was new, but now first i have started to experiment with scripts etc, so i dont have any skills in it, but wonder what you say about it.

One thing I wonder about is the trailer cars on the trains, could they carry a car like the truck trailer? There are only trailer cars in the Industrial area in the original game and there is no crane by the tracks, but I wonder what would happen if there was one?
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: Script help

Post by Pyro »

Ongen wrote:I have played gta2 since it was new, but now first i have started to experiment with scripts etc, so i dont have any skills in it, but wonder what you say about it.
  • To start with, download GTA2 MIS Pad and grab a copy of the official scripting documents for almost every code you need (ignore the compiler that comes with the official one - the MIS Pad is far better).
  • When you load GTA2 MIS Pad, it comes with an extremely simple sample script - extremely useful for quickly testing a map but not much else until you add more stuff. Don't forget the raw code is saved as .MIS (which can also be opened in Notepad) and the compiled script which GTA2 needs is .SCR. The .SCR has to be inside the GTA2\data folder (along with your map) to work.
  • To learn more GTA2 scripting, I have a lot of scripting tutorials that I wrote which are hosted on Ben Millards website ('Project Cerbera'). This covers a lot of things from basic stuff to creating parked cars and characters, all the way to more complex things like character AI, trains and more.
  • For the stuff I don't cover in my tutorials, browsing through the official GTA2 scripting document is also handy. Each code is explained with what it does and has an example.
  • Since a lot of people include .MIS files in their releases, this can also be a good way of looking how code works and stuff (if it's annotated!). Of course, please don't blatantly rip off other peoples work! If you like the look of something - ask the person!
  • Using GTA2 Game Hunter is not only a handy way of finding people to play against in GTA2 but also ask questions there too (as well as this forum).
Ongen wrote:One thing I wonder about is the trailer cars on the trains, could they carry a car like the truck trailer? There are only trailer cars in the Industrial area in the original game and there is no crane by the tracks, but I wonder what would happen if there was one?
The train 'trailers' cannot carry anything I'm afraid. Also, trying to manually spawn trains and the likes by making it as a 'car' will not work - it will instantly crash the game! Quite a few other things which are possible, and some can't be done at all - that just shows how old GTA2 scripting is and how long it's survived for and still being used!

Still, good luck with GTA2 scripting - any other questions just fire away! 8-)
Razor
Lunatic
Lunatic
Posts: 456
Joined: 19 Jul 2008, 14:14
GH nick: Razor, R
Location: Poland / Szczecin
Contact:

Re: Script help

Post by Razor »

is it possible to make wall with let object pass and players/bot no?
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Script help

Post by Sektor »

If a character is near a location, you could change the block type, kill the character or teleport a player. The warp command doesn't work on bots, you would have to kill them and recreate.
Post Reply