GTA2 UFO

User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: GTA2 UFO

Post by Gustavob »

Can that be made so it could be triggered? E.g. when you "shoot" with one of those unused "weapons" (those blue letters), an explosion would happen at the lowest level below the vehicle, or just explode any car that may be below you.
You just lost the game.

User avatar
Sektor
Boss
Boss
Posts: 1391
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 UFO

Post by Sektor »

That's how it was in the video, fire button triggered the explosions. I have removed the M letter weapon since the game crashes when a normal cop sees you use it. At the moment the level 2.0 explosion is triggered as soon as you select vehiclebomb (you don't push fire button).

brake/jump button to fly up
horn/furp button to fall down
special 2 (alt by default) to make the vehicle spin anticlockwise

User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: GTA2 UFO

Post by Gustavob »

Oh.

Y'all know what this means right?

Bomber aircrafts! Could be cool in, perhaps, a map with some kind of war setting

Edit: does it currently only explode at Z: 2.0? If so, can't it be made so it just explodes whatever the first solid Z level below the player is?
You just lost the game.

User avatar
Sektor
Boss
Boss
Posts: 1391
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 UFO

Post by Sektor »

Yes could fake a new wanted level, eventually the army sends in the choppers and jets.

At the moment, the only way I know to detect first solid is to drop a ped/car and wait a second for them to land. I don't drop anything in the current script, I create an explosion object and then move it to the player location with a Z of 2.0. I could move it to current player height - 3 instead of always to z level 2.

255.0 can be used for detecting first solid but manually setting a car/player z to that doesn't trigger the detection.

User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: GTA2 UFO

Post by Gustavob »

Cars can be declared with no Z level — I never did it like that but I assume it finds what the highest solid Z-level is at the given X and Y coordinates? Maybe someone could find out if there's a way to do the same with explosions!
You just lost the game.

User avatar
Sektor
Boss
Boss
Posts: 1391
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 UFO

Post by Sektor »

You can create multiple explosions at every single height so you know you will hit your target but I noticed trains seem to be immune to this type of explosion.

User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: GTA2 UFO

Post by Gustavob »

Perhaps a Molotov could be spawned at and dropped from the plane's location, it would ensure both the timing and the height of the explosion are correct, but it would remove the surprise when attacking other players from above
You just lost the game.

User avatar
Sektor
Boss
Boss
Posts: 1391
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 UFO

Post by Sektor »

You can't create active molotovs or grenades with the CREATE_OBJ command. There might be a way to create one type of object and change memory to turn it into another type, I just haven't searched for that address yet.

edit: As BenMillard stated, you can create active molotov objects but I'm not sure how to make them drop in the direction you are facing since they start moving as soon as they are created and I only know how to rotate an object after creation.

User avatar
Vike the Hube
Hitman
Hitman
Posts: 143
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: GTA2 UFO

Post by Vike the Hube »

What's funny about this is that Sektor's been badgering me to do it for about a year now. Took me about 2 hours once I had all the stuff in front of me. Haha.

BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 UFO

Post by BenMillard »

Sektor wrote:You can't create active molotovs or grenades with the CREATE_OBJ command. There might be a way to create one type of object and change memory to turn it into another type, I just haven't searched for that address yet.
CREATE_OBJ command lets you make an active ROCKET which you could change to a MOLOTOV in memory? Depends whether it's one parent class which changes everything about the bullet or maybe it's a bullet plus particle effects plus motion, all separated out and synchronised in realtime by various sections of code elsewhere...

GTA Modding wiki has memory addresses for GTA San Andreas and a category for GTA2. Memory addresses could be documented there, with a usage guide written separately.

Doing it as forum topics is fine for now. Better to continue innovating and finding stable ways to use the features than write endless wiki code. Then again, the sooner we switch to writing in a wiki the less re-formatting there will be.

I'm happy to act as a wiki gnome for this. Indeed, I set up some of the early conventions on GTA Modding (while on GTA Forums staff) for the homepage layout, category names and best use of wikicode.

(EDIT) Gluing several sprites together so we can make larger flying vehicles would be possible? Now we have position and angle control. Super fiddly but that would make planes look way better.

PUT_CAR_ON_TRAILER might take care of rotation and altitude. Hopefully there's an x and y offset (obviously 0 in the normal case) which could be set once to avoid calculating an absolute position manually every frame. (Trigonometry is painful.)

User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 UFO

Post by elypter »

if collisions and damage is not required then it shouldnt be too difficult to make tiles bigger than 256x256. for rotation youd have to use sin and cos only once if you want to make a 512x512 square
yur sa'nok ngeyä

BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 UFO

Post by BenMillard »


User avatar
Serial Killer
Psycho
Psycho
Posts: 93
Joined: 21 Oct 2014, 12:54

Re: GTA2 UFO

Post by Serial Killer »

the game crashes when it started
I'm Serial Killer, my job is killing you!

Galactic Boy
Immortal
Posts: 333
Joined: 15 Apr 2012, 08:26

Re: GTA2 UFO

Post by Galactic Boy »

I thinking that you've got 11.42 version of GTA2.

User avatar
Serial Killer
Psycho
Psycho
Posts: 93
Joined: 21 Oct 2014, 12:54

Re: GTA2 UFO

Post by Serial Killer »

11.44
I'm Serial Killer, my job is killing you!

Post Reply