Return to index
Page: 1, 2
Printable Version Abbreviations
GOURANGA! Forums > Editing > General > GTA 2 scripting help
Post 1 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
Hello...
I'm new in this forum and just have started scripting a new multi player map based on the Tiny town original map.
I have some questions:
First of all I d like to ask if any de compiler available for the original gta2 script files? If not , could you please tell me what types of values are in the original  MP1-2P.SCR   ??
The problem is , I don't know which values should I type in the script file to make the game work well,  simply I'd like to modify the original  MP1-2P.SCR.
 I ve already made a script file but sometimes the traffic goes to wrong direction causing traffic jams and using my script file the map is too dark but the original script file make the lights brighter.
Could you write me or show a raw multi player script file without the guns , parking cars, frenzies, pickups etc.
Thank you very much
Post 2 | New
Sektor
Sektor's Avatar


  • Joined: Feb '03
  • Posts: 288
No one has made a GTA2 script decompiler, it would be a lot of effort.   Tiny Town Bot Mod has most of the Tiny Town weapons placed where they normally are.

Lighting takes a lot of effort to place correctly and even though it looks nice, it's harder to see mines and players in multiplayer, so most people play with lighting disabled (set to noon).

Traffic should work close to normal since zones are stored in the .gmp file, not in the .mis file.

Here's a bare script for Tiny Town:
Code:
PLAYER_PED p1 = (  71.5 , 197.0 , 4.0 ) 10  90 // player 1
PLAYER_PED p2 = ( 101.0 , 197.0 , 4.0 ) 7 270 // player 2

COUNTER neverends = 1 // declares a variable called neverends and sets it's value to 1
DECLARE_POLICELEVEL ( 5 ) // if you set it to 6,  the national guard/army will appear but they make the game go out of sync

LEVELSTART

WHILE_EXEC ( neverends = 1 ) // if neverends equals 1 then process all the commands until ENDWHILE and then repeat/loop

  DO_NOWT // doesn't do anything but you need to put something in a while loop or it won't compile

ENDWHILE

LEVELEND


------------------
Stealing cars is the easy part
Post 3 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
My scriptfile looks like this: Attached
should I put something else in it?
the WHILE_EXEC value controls what type of commands??
And what is neverends?  I understand the word but what does it do?
Thanks indeed

Attached File:
The file has been deleted.

Post 4 | New
Sektor
Sektor's Avatar


  • Joined: Feb '03
  • Posts: 288
You don't need WHILE_EXEC unless you want to check for or do something often.  It means WHILE the counter called NEVERENDS has the value of 1 (it always will, unless I set it to another value), keep running the commands between WHILE_EXEC and ENDWHILE.

neverends is not a command, it's just the name I gave to a counter.  I could of called it anything.

Since you only need to place the weapon generators once and enable them once, you don't need a while loop.

------------------
Stealing cars is the easy part
Post 5 | New
Delfi
Programmer

Delfi's Avatar


  • Joined: Feb '03
  • Posts: 844
i have a side question - are you the oliii from gamedev.net?

------------------
www.mathpudding.com
Post 6 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
Sektor wrote:
You don't need WHILE_EXEC unless you want to check for or do something often.  It means WHILE the counter called NEVERENDS has the value of 1 (it always will, unless I set it to another value), keep running the commands between WHILE_EXEC and ENDWHILE.

neverends is not a command, it's just the name I gave to a counter.  I could of called it anything.

Since you only need to place the weapon generators once and enable them once, you don't need a while loop.



Ohh I see what you mean....
Thank you anyway  I continue my work .........
Post 7 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
Delfi wrote:
i have a side question - are you the oliii from gamedev.net?


I dont think so because my first letter of my name is always Capital letter.
Anyway I ve never been on this site.
Post 8 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
Could you help me again?
I d like to do that when I in multiplayer enter a car it explodes immediately. How can I do that?
The other question:
I ve given to one car a car alarm but I want to do If the car alarm begins somebody comes to get me out from the car like the cops do.
How can I do these two things?
Please help me
Thanks anyway
Post 9 | New
Pyro
GTA2 Scripter & Mapper

  • Joined: Jun '03
  • Posts: 247
Oliii wrote:
I'd like to do that when I in multiplayer enter a car it explodes immediately. How can I do that?


You have to create an IF statement inside the WHILE loop. A basic example would be:

Code:
IF ( IS_CHARACTER_IN_CAR ( player , car ) )
EXPLODE_LARGE ( car ) // extremely large explosion
ENDIF


This simply checks that the character "player" is in the car named "car" and then explode. You can further expand this if needs be later on.

Oliii wrote:
I've given to one car a car alarm but I want to do If the car alarm begins somebody comes to get me out from the car like the cops do.


There is actually no check to see if a car alarm is on, but, you can just assign the alarm to the car and do an IF check on it like above.

Hope this helps  smile

------------------
http://www.storm.elxx.net/Pyro/images/gta2pyro.png

Quote:
"Side effects may include: dry mouth, nausea, vomiting, water retention, painful rectal itch, hallucination, dementia, psychosis, coma, death, and halitosis. Magic is not for everyone. Consult your doctor before use."


Quote:
"Sharper than one of Oscar Wilde's witticisms rolled up, dunked in lemon juice and stabbed in someones eye..."
Post 10 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
Pyro wrote:
Oliii wrote:
I'd like to do that when I in multiplayer enter a car it explodes immediately. How can I do that?


You have to create an IF statement inside the WHILE loop. A basic example would be:

Code:
IF ( IS_CHARACTER_IN_CAR ( player , car ) )
EXPLODE_LARGE ( car ) // extremely large explosion
ENDIF


This simply checks that the character "player" is in the car named "car" and then explode. You can further expand this if needs be later on.

Oliii wrote:
I've given to one car a car alarm but I want to do If the car alarm begins somebody comes to get me out from the car like the cops do.


There is actually no check to see if a car alarm is on, but, you can just assign the alarm to the car and do an IF check on it like above.

Hope this helps  smile


Thank you very much , very kind of you.
Post 11 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
Its interesting, because sometimes every car I get in explodes not just the one I want to.
Why??
Post 12 | New
Pyro
GTA2 Scripter & Mapper

  • Joined: Jun '03
  • Posts: 247
Hmm, I've never had that before. The IF statement checks to see if the player is in a specific car, and if he is, do the code otherwise do nothing.

Can't help you there without being more specific  no

------------------
http://www.storm.elxx.net/Pyro/images/gta2pyro.png

Quote:
"Side effects may include: dry mouth, nausea, vomiting, water retention, painful rectal itch, hallucination, dementia, psychosis, coma, death, and halitosis. Magic is not for everyone. Consult your doctor before use."


Quote:
"Sharper than one of Oscar Wilde's witticisms rolled up, dunked in lemon juice and stabbed in someones eye..."
Post 13 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
Pyro wrote:
Hmm, I've never had that before. The IF statement checks to see if the player is in a specific car, and if he is, do the code otherwise do nothing.

Can't help you there without being more specific  no


So I talk about multiplayer game.
We ve tried to play the game in multiplayer Tag game you know, when you have to chase the other one.
Any time we play this map with this script in multiplayer if I or my partner get in a non specific car it explodes, but not  always.
Post 14 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
something still wrong with the game.
Something isnt correct, sometimes it does interesting things for example  when you shoot your opponent the bullets go that way where my opponents are. So if they behind me the bulets go that way and not straight forward.
Or when I place a land mine front of a moving Vehicle the Vehicle explodes before reaching  the mine.
Interesting huh.......
Post 15 | New
Sektor
Sektor's Avatar


  • Joined: Feb '03
  • Posts: 288
I've had the bullet bug before, no matter what way i'm facing, sometimes my bullets went towards my opponent, really weird.  It's only happened in my own scripts and not the official scripts.

In tag, to make it harder to escape, your car starts to burn, are you sure that isn't the reason for the explosion?  Post the whole script.

------------------
Stealing cars is the easy part
Post 16 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
Sektor wrote:
I've had the bullet bug before, no matter what way i'm facing, sometimes my bullets went towards my opponent, really weird.  It's only happened in my own scripts and not the official scripts.

In tag, to make it harder to escape, your car starts to burn, are you sure that isn't the reason for the explosion?  Post the whole script.

the problem is that it isnt starts burning just explode but to tell you the truth I put those while loops into the script see above.
And can you tell me why sometimes the game slow and sometimes fast , I mean this happens when you have an old graphics card and the games run slow on it but I have a good card .And I speak about not the frame limiter.
here is my script can you tell me If there is missing from it please?
attached

Attached File:
The file has been deleted.

Post 17 | New
Cerbera
Ben 'Cerbera' Millard

Cerbera's Avatar


  • Joined: Feb '03
  • Posts: 1,800
Sektor wrote:
I've had the bullet bug before, no matter what way i'm facing, sometimes my bullets went towards my opponent, really weird.  It's only happened in my own scripts and not the official scripts.
It isn't a bug, bullet weapons automatically aim to the nearest character.  When another player is on screen and very close, bullets automatically aim at them regardless of where you are aiming.

------------------
My Grand Theft Auto Handling Editor
My GTA Tutorials
http://projectcerbera.com/button.png
Post 18 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
when I kill a char in the multiplayer game it's body stay on the ground till the end of the match, but why?
How can I get rid of them?
And what is , check if char is in car ... etc. for?
How can I use these check ....  commands?
Thanks indeed.
Post 19 | New
Sektor
Sektor's Avatar


  • Joined: Feb '03
  • Posts: 288
The bodies are supposed to stay there.  DELETE_ITEM  ( character_name ) works on computer controlled characters but i'm sure it will crash if you try it on a player.

------------------
Stealing cars is the easy part
Post 20 | New
Oliii
  • Joined: Aug '05
  • Posts: 14
Sektor wrote:
The bodies are supposed to stay there.  DELETE_ITEM  ( character_name ) works on computer controlled characters but i'm sure it will crash if you try it on a player.


But the dummy's dead bodies and the policemen's dead bodies disapear after killing them.
Im speaking about the computer controlled chars , when I kill them their body stay on the ground. So if I took the DELETE_ITEM into a while loop it would be good, wouldnt it?

But how can I delay the char's respawn?
Page: 1, 2
Printable Version Abbreviations
IceyBoard 1.6.2 © 2002-12 Icey