Return to index
Printable Version Abbreviations
GOURANGA! Forums > Editing > General > GTA1 Tutorial
Post 1 | New
Cerbera
Ben 'Cerbera' Millard

Cerbera's Avatar


  • Joined: Feb '03
  • Posts: 1,800
INSANE STUNTS!

Intro:
This tutorial will show you how to make the INSANE STUNT BONUS features for you map.  These are used in the originalgame extensivly in San Andreas, no-one seems to have found most of them unless they actually looked round the map and mission file, like we will now.
The way they are actually work is that there is a 'launch' ramp and a 'catch' ramp on the map.  There is a launch TRIGGER and a catch TRIGGER object in the mission file too.
The catch trigger is turned off when the level starts but when you drive on the launch ramp the catch trigger is enabled when You drive on the launch ramp.  The way it does this is that the launch trigger enables the catch trigger, then waits for a few seconds, then turns off the catch trigger.
You have to get from the launch ramp to catch ramp within this time.  If you crash, or decide to chicken out of the jump, the catch trigger will be disabled and the launch trigger enabled ready for a seconds try.
If you reach the catch trigger before the launch trigger disables it again, you will get the INSANE STUNT BONUS and 50 grand.  Radical!

Now you may have noticed that you might be able to to drive to the lanch trigger, drive round whatever the jump is over, trigger the catch trigger and so get the bonus with ever doing the jump.  This is indeed possible, but the timers are set very close to the time it willt take for a sucessful jump, and the launch or catch trigger will be put at the end of a ramp that you would have to drive up.  So it's pretty impossible to cheat these jumps in reality.
If you noticed this congrats, you have the makings of an excellent mission coder - maybe even a good as me one day!  8-D

Where's the Stuff Responsible for This?
I will be using San Andreas as the example here as it has a few of these bonuses.  Sure, you rember, there was that Penetrator (Porsche 911) parked up in north-east Richman that you cold jump over all that water...  So open up the original mission.ini file, SanA.cmp in J25 1.6 and the original English.FXT file to view the text.

To locate these stunt bonuses, we'll first have to locate the INSANE STUNT BONUS text, so search the FXT file for:
Code:
INSANE STUNT BONUS

And it will bring up this line:

Code:
[2514]INSANE STUNT BONUS!


Now we search the mission code for to see when message 2514 is created.  So search for:
BRIEF 0 0 0 0 2514
And it finds this chunk:

Code:
29000 DISABLE 10000 0 0 0 0
29010 DISABLE 10010 0 0 0 0
29020 GOTO 10010 0 29041 100 0
29030 IS_GOAL_DEAD 85 29041 0 0 0
29035 SURVIVE 0 0 0 40 0
29038 MESSAGE_BRIEF 0 0 0 0 2514
29039 SURVIVE 0 -1 0 0 50000

29041 ENABLE 10000 0 0 0 0
29042 ENABLE 10010 -1 0 0 0

Now we see the DISABLE is pointed to 10000 which must be a trigger, so we go up to the objects area of that chapter and find the object chunk around 10000:

Code:
10000 1 (42,195,4) TRIGGER 29000 1
10010 1 (42,200,4) TRIGGER 29010 1

Marvelous!  A takeoff and landing trigger!

But What is it Doing?
Now to work through this code.  The DISABLE 10000 part means that it was TRIGGER 10000 that started this procedure.  We'll bear that in mind.
Now a quick run through it.  After TRIGGERs 10000 and 10010 are DISABLEd it then does this odd-looking command:
Code:
29020 GOTO 10010 0 29041 100 0

Now what this actually does is a little odd to explain.  Pronounce the command "Got To" not "Goto" because the command is testing to see if you "get to" trigger 10010 before 100 frames have been drawn - GTA draws 25 frames per second, thus it gives you 4 seconds to leap from the launch ramp to the catch ramp, which wouldn't be long enough to drive over the jump trigger, drive round and then drive over the landing trigger before the timer ran out.  Times like this you realise how much the GTA1 mission coders cared about thier work and how good thier dedication made it.
If you don't get to the catch trigger before 100 frames have passed then it goes to line 29041:
Code:
29041 ENABLE 10000 0 0 0 0

Now this may seem a bit weird, but what it's doing is to stop waiting for the player to reach the catch trigger and enables the launch trigger ready for you to try again.  You probably noticed when playing that if you didn't make it then tyou could try it again... once you'd driven back there from the hospital!
But what if you do make it?  Well if you go over the catch trigger before 4 seconds after the launch trigger then the command processor falls through to the next command in sheer delight:
Code:
29030 IS_GOAL_DEAD 85 29041 0 0 0

Now this checks to see if the PLAYER (object 85) is dead.  If he is, it goes to 29041 which makes it all ready to start again.  You may have noticed that when you've over-jumped it, like blown straight over the catch ramp and crashed into an ornamental pond (or similar) then you can still try it again.  And if you do make it the command processor staggers triumphanty into the "succes" bunch of code:
Code:
29035 SURVIVE 0 0 0 40 0
29038 MESSAGE_BRIEF 0 0 0 0 2514
29039 SURVIVE 0 -1 0 0 50000

The SURVIVE line makes it wait for 40 frames, then it displays our good old friend message 2514:
Code:
[2514]INSANE STUNT BONUS!

Then the final SURVIVE line adds 50000 points to your total (assuming x1 bonus multiplier) and kills the routine with that sharp pointy -1 parameter.

Hopefully you now have some understanding of how these things work!


How do I Try This Myself?
You lucky, lucky person.  I've made a real effort with this tutorial and am supplying a map, mission code AND the in-game text document for it.  If you open the mission.ini file you may notice I do my code slightly differently by using a DUMMY rather than a trigger, this a marginally better way of doing it than they did...

I have made the first launch/catch ramp combination, and a slightly lower second launch ramp.  What you have to do is make the catch ramp for the second one and place the DUMMY accordingly.  Bear in mind that the end of the launch and catch ramps have to be flat!
And bear in mind that the more subtle your ramps are the more enjoyable they will be to find and use.  Using stairwells up to a line of high buildings with thier rooves at the same heights, especially with them all sloped, will create an imaginative jump which is a joy to come off.
Also, using the superbike for a jump means that you can use the steep slopes...

Download the below zip file and unzip the 3 files to your GTAGTADATA folder:
 • Insane Stunt Workspace
Then run the game, then choose any level.  You will appear on this map:
http://cerbera.daves-hosting.co.uk/gta1/tutorials/stuntmap.JPG

The idea is you take the vehicle at the top of the left jump, make that jump to great applaude and media attention.  You then open the map using the Junction25 map editor and try to make a catch ramp for the other jump.  I'd advise you just select and copy my ramp, and paste it where you rekon it needs to be.
Alter it's position till it works properly and hey presto!  You nowknow how far a vehicle can go when it launches at a certain speed from a certain height.
Something you should bear in mind is that in GTA1, unlike in GTA2, the steepness of the slope doesn't change how far the car will travel.  It simply falls off the end of a ramp; gaining no height at all.

------------------
My Grand Theft Auto Handling Editor
My GTA Tutorials
http://projectcerbera.com/button.png
Post 2 | New
Toumai
Wal-Mart Greeter

  • Joined: Feb '03
  • Posts: 932
You don't suppose you'd allow me to host a copy of that at my site along with your Mission INI tute (you being credited anywhere your work appears of course :Y )

Please?

------------------
link's dead baby, link's dead
Post 3 | New
Cerbera
Ben 'Cerbera' Millard

Cerbera's Avatar


  • Joined: Feb '03
  • Posts: 1,800
Yeah, I guess that would be fine.  I had a couple more tutes on missions.gouranga.com too...

------------------
My Grand Theft Auto Handling Editor
My GTA Tutorials
http://projectcerbera.com/button.png
Post 4 | New
Toumai
Wal-Mart Greeter

  • Joined: Feb '03
  • Posts: 932
Excellent, the collection grows  :D, It'll be up in no time.

------------------
link's dead baby, link's dead
Post 5 | New
Road Runner Canada
Car Maker

  • Joined: Feb '03
  • Posts: 449
well cerbera could i use these tutorials also u will have credit and all ....

------------------
ReSpEkT :T -made by one and only me
Post 6 | New
ferret
mustelid

  • Joined: Feb '03
  • Posts: 125
No... he's posting them all up on the board to show off, not so people can use them.  :]
Post 7 | New
Cerbera
Ben 'Cerbera' Millard

Cerbera's Avatar


  • Joined: Feb '03
  • Posts: 1,800
That's either a really poor snipe or just plain dumbness.

I don't see any reason to restrict where my tutorials get displayed.  I don't have them up on my own site, plus they are designed for public use and distribution anyway so to regulate them would be silly.

------------------
My Grand Theft Auto Handling Editor
My GTA Tutorials
http://projectcerbera.com/button.png
Post 8 | New
Road Runner Canada
Car Maker

  • Joined: Feb '03
  • Posts: 449
ok thanks cerbera i will start working on this soon

------------------
ReSpEkT :T -made by one and only me
Printable Version Abbreviations
IceyBoard 1.6.2 © 2002-12 Icey