Collection of gta scripting and map weirdness

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: Collection of gta scripting and map weirdness

Post by Gustavob »

Slope bug: Walls after slopes won't stop you if the block after the slope is set to air or is empty

Also, this one is pretty known (I guess), and I'm quite surprise it hasn't been added yet: If you have a wanted level and drive around in an RC car and you find a ped cop, the cop behaves weird.
You just lost the game.
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Collection of gta scripting and map weirdness

Post by elypter »

gangs only use the first weapon on multiplayer

setting the can drive over cars flag for wrecks has no effect
yur sa'nok ngeyä
User avatar
JohnTooray
Mugger
Mugger
Posts: 19
Joined: 06 May 2011, 11:43
Location: Munster, Germany

Re: Collection of gta scripting and map weirdness

Post by JohnTooray »

Quite known but yet unmentioned weirdness:

Angles for phones rotated by 90 degree.
Why the heck they didn't simply turn those three little graphics instead of having two different angles, one for phones, one for all the other things? It's the first thing I do when making custom .STY files: correctly rotated phone graphics.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: Collection of gta scripting and map weirdness

Post by T.M. »

JohnTooray wrote:It's the first thing I do when making custom .STY files: correctly rotated phone graphics.
I would recommend using Epic GTA2 Map Editor to place and rotate the phones (or any other objects), then you cant make them wrong.

Also, i wonder, which side is "up" side with phones? The tutorial doesnt tell this.
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: Collection of gta scripting and map weirdness

Post by Pyro »

I've always wondered that as well.

And by the way, my tutorial does say what 'up' is, its just called north. South is down etcetera. Simple!
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: Collection of gta scripting and map weirdness

Post by T.M. »

Pyro wrote:And by the way, my tutorial does say what 'up' is, its just called north. South is down etcetera. Simple!
I mean which side of the phone is "up" side...
User avatar
JohnTooray
Mugger
Mugger
Posts: 19
Joined: 06 May 2011, 11:43
Location: Munster, Germany

Re: Collection of gta scripting and map weirdness

Post by JohnTooray »

T.M. wrote:I would recommend using Epic GTA2 Map Editor to place and rotate the phones (or any other objects), then you cant make them wrong.
Normally I would agree. But with my old notebook it isn't that easy with your editor... Also when dealing with multiple scripts and missions at once and doing mostly copy-paste-action is more comfortable with Notepad++. ;)
Davidio
Psycho
Psycho
Posts: 67
Joined: 22 Feb 2011, 12:18
GH nick: Davidio

Re: Collection of gta scripting and map weirdness

Post by Davidio »

The game crashes, if you make a KILL_FRENZY and use only IF(LOCATE_CHARACTER_ANY_MEANS) to edit the wanted level........... (This problem i have actually ^^)
BenMillard
Immortal
Posts: 890
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Collection of gta scripting and map weirdness

Post by BenMillard »

ATTENTION
If you have been making GTA2 mods for less than 1 year, start a separate thread before posting to this 'weirdness' topic.

Why? Because it's probably something you've done wrong, rather than something weird about GTA2.

Thank you.
CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Re: Collection of gta scripting and map weirdness

Post by CarThief »

I've been messing with CHECK_WEAPON_TYPE_HIT_CHAR and observed some peculiar behaviour.

It DOES work but in a very limited fashion. It appears to function for every on-foot weapon except throwables and Fists(didnt test for ped fists, though), though i havent tested it with the Electro Baton, neither direct or indirect impacts on characters with these weapons seem to trigger it.
Nor does it seem to function with car mines, or car bombs, vehicle machine guns do work as it works with pistol/MG bullets as well.

Strangest part is that once a check successfully occurs it blocks out every other check from happening, so if a ped who reacts to shotguns and bullets got hit by a bullet it would no longer trigger on shotguns, and visa versa. Deleting the character and respawning it seemed make nothing trigger it anymore, and most likely requires a new character for the job.
So yeah it still works if you only need it for one weapon. Triggers in the exact same way with and without invulnerability.

Edit: Well nothing else seemed to work. Though i imagine car-weapons based off of hand weapons like the Car-Flamethrower and Vehicle MG's, and the Tank Gun/Turret should work as their respective handheld counterparts. There's alot of weird damage types too, such as BY_UNKNOWN_WEAPON, and even BY_PUBLIC_TRANSPORT! Heh, getting run over by a bus of all things...
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Collection of gta scripting and map weirdness

Post by elypter »

thanks for this. shows again that gta2 reverse engineering is a scientific dicipline for itself
yur sa'nok ngeyä
Jones
Psycho
Psycho
Posts: 51
Joined: 08 Aug 2012, 21:25

Re: Collection of gta scripting and map weirdness

Post by Jones »

[mis]SET_GANG_INFO (copgang, 4,GRENADE,GRENADE,GRENADE,4, 0.0,0.0,0.0,2,COPCAR,5)
SET_GANG_INFO (copgang, 0,GRENADE,GRENADE,GRENADE,4, 0.0,0.0,0.0,2,COPCAR,5)[/mis]
Those two combinations gives you normal working cop cars as gangcars, even army remap is overwritten for the drivers.

[mis]SET_GANG_INFO (copgang, 4,GRENADE,GRENADE,GRENADE,4, 0.0,0.0,0.0,2,JEEP,5)
SET_GANG_INFO (copgang, 0,GRENADE,GRENADE,GRENADE,4, 0.0,0.0,0.0,2,JEEP,5)[/mis]
Like before normal cop car behaviour and army remap is also overwritten, but these crash the game if a gang car is chasing you or the drivers leave the car.
Jones
Psycho
Psycho
Posts: 51
Joined: 08 Aug 2012, 21:25

Re: Collection of gta scripting and map weirdness

Post by Jones »

random code produces somehow random remap on peds :lol:
[mis]PLAYER_PED p1 = (130.7, 120.8, 2.0) 26 26

COUNTEr bla=1

COUNTER ped=0
LEVELSTART
CHAR_DATA char

WHILE_EXEC(bla=1)
IF(HAS_CHAR_PUNCHED_SOMEONE(p1))
STORE_LAST_CHAR_PUNCHED(p1,ped)
SET char=(ped+100)
SET_CHAR_INVINCIBLE ( char , ON )
ENDIF

ENDWHILE

LEVELEND[/mis]
User avatar
Sektor
Boss
Boss
Posts: 1433
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Collection of gta scripting and map weirdness

Post by Sektor »

Jones wrote:random code produces somehow random remap on peds :lol:
That is weird.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: Collection of gta scripting and map weirdness

Post by T.M. »

Sektor wrote:
Jones wrote:random code produces somehow random remap on peds :lol:
That is weird.
Maybe it modifies the raw binary data in the ped+100, going out of bounds somehow. Using this bug, we could do a lot more than just that, now when we know the format of each of the commands. Too lazy to try it atm. Someone else try it?
CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Re: Collection of gta scripting and map weirdness

Post by CarThief »

Well while testing i found out that IS_CHAR_FIRING_IN_AREA does not trigger upon the use of Molotovs or Grenades, resulting in free kills in the underground metro shop i built without everyone suddenly shooting you to bits.
Havent checked other similar commands though, neither did i test this command with an Electro Baton, but that weapon is harmless anyway. Every other weapon does seem to trigger it normally.

If you're curious the exact circumstances are below.
The complete command was:
IF(IS_CHAR_FIRING_IN_AREA(Player1, 48.5, 162.5, 1.0, 32.0, 14.0))
Which happened to be playing in a mission file called wsd_st2.mis if that matters any bit.
Edit: And it was GTA2 version 11.43.

I wonder if the other fire checking commands have the same issue...
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: Collection of gta scripting and map weirdness

Post by T.M. »

Jones wrote:random code produces somehow random remap on peds :lol:
[mis]PLAYER_PED p1 = (130.7, 120.8, 2.0) 26 26

COUNTEr bla=1

COUNTER ped=0
LEVELSTART
CHAR_DATA char

WHILE_EXEC(bla=1)
IF(HAS_CHAR_PUNCHED_SOMEONE(p1))
STORE_LAST_CHAR_PUNCHED(p1,ped)
SET char=(ped+100)
SET_CHAR_INVINCIBLE ( char , ON )
ENDIF

ENDWHILE

LEVELEND[/mis]
How does the randomness appear? I tested the code but nothing happened.
Jones
Psycho
Psycho
Posts: 51
Joined: 08 Aug 2012, 21:25

Re: Collection of gta scripting and map weirdness

Post by Jones »

here is a screenshot. the marked peds have been punched by me and have obviously changed their remap. I used scriptpad with newest gta 2 version and running on win7. It looks like the peds become GANG_GRAPHIC instead of DUMMY_GRAPHIC.
Attachments
randomness.png
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: Collection of gta scripting and map weirdness

Post by Pyro »

(Oversight) and/or (Bug) - Creating a character inside a tank as ROAD_BLOCK_TANK_MAN occupation will make them try and shoot the player from miles away. Workaround: Do a check to see if the tank is on-screen first and then add a character inside the tank with the RBTM occupation. It will still try and shoot you off-screen afterwards but at least you won't get rocket-sniped right away.
User avatar
_L1pE_
Car Jacker
Car Jacker
Posts: 28
Joined: 08 Jan 2015, 15:02
GH nick: _L1pE_

Re: Collection of gta scripting and map weirdness

Post by _L1pE_ »

Semi-transparent faces in map editor:
Image
AFAIK GTA 2 doesn't really support this in-game and it doesn't happen normally in the editor either, so I thought it was interesting that it's possible to glitch out like this.
Let's go for a joyride
Post Reply