Script idea

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Script idea

Post by Cuban-Pete »

You guys know how to script/edit GTA2, right?

I had this funny idea that you let it rain peds.

You know that when you shoot a ped with a rocket it goes up and drops down from the sky, can you do that like 10-20 at the same time many different directions and constant? I think it will look funny. :P
"Mmmm, your eyes are so beautiful."
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: Script idea

Post by B-$hep »

I think it's possible with small explosion and at the same coordinates create some peds, All at the same time.
Explosion will occur and peds gonna fly.

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

Re: Script idea

Post by Gustavob »

Its doable, just like B-$hep said, create some grenade-sized explosions under spawn points in wich numerous peds spawn at once, so they fly away. But the problem is to make it synchronized, like spawning lots of peds, wait for them to get on floor and only then explode, and also make it loop synchronized is even more difficult, but must be doable.
You just lost the game.
Razor
Lunatic
Lunatic
Posts: 456
Joined: 19 Jul 2008, 14:14
GH nick: Razor, R
Location: Poland / Szczecin
Contact:

Re: Script idea

Post by Razor »

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

Re: Script idea

Post by Gustavob »

yeah that might work too :P I'll try to make simple script with only one ped spawn point, if it works ill post it here
You just lost the game.
Razor
Lunatic
Lunatic
Posts: 456
Joined: 19 Jul 2008, 14:14
GH nick: Razor, R
Location: Poland / Szczecin
Contact:

Re: Script idea

Post by Razor »

do loop:

IF (has_character_died (x))
create char blablalblablal
explode_small (x)
ENDIF
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: Script idea

Post by Gustavob »

peds rain.rar
Peds Rain
(3.36 KiB) Downloaded 923 times
Ok i made it with help of Heri, PL. The script is used in Tiny Town and because of that only 5 chars are created, since more than that can cause the game to crash. Download, extract to your gta2\data folder and run Peds Rain in Create Game window in GH to play this map.

It doesnt support multiplayer because it can desynch with explosions. Notice that game can also crash if you play it during a long time
You just lost the game.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Script idea

Post by Cuban-Pete »

Yeah, it does crash a lot. :(

Thanks for the hard work, but it is not like I had in mind.

The peds are now stuck at one place, is it not possible to let the peds that walk on the street get explode/flying at once...?

Perhaps you can put the script on a weapon/fist that all surrounding people fly away (like with electrogun, but you don't see the electricity) when you punch. :)
"Mmmm, your eyes are so beautiful."
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: Script idea

Post by Gustavob »

Cuban-Pete wrote:Yeah, it does crash a lot. :(
Yeah, its because of the explosions. Too much explosions can cause the game to crash as I said, even if player can't see them.
Cuban-Pete wrote:The peds are now stuck at one place, is it not possible to let the peds that walk on the street get explode/flying at once...?
No, its not possible to make normal street peds (that are created by game automatically, the peds I made are special chars, those are made in script so I can do whatever I want to do with them) fly away/explode. Only thing I can do with those peds is to create a riot in wich all peds punch all peds and player (aka make them all muggers).
Cuban-Pete wrote:Perhaps you can put the script on a weapon/fist that all surrounding people fly away (like with electrogun, but you don't see the electricity) when you punch. :)
I didnt get exactly what you mean. Do you mean like you punch and peds fly away, or like kinda remove the bullets/rockets/electricity from weapons? Or what? Plz explain, so I can actually see if its doable.

Also, I could make for example rockets coming out of walls (not like people firing with rocket launchers, only the actuall rockets in some places on walls, so they hit peds and they fly away), but it takes long to make, takes a lot of script lines and rockets could hit player too.
You just lost the game.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Script idea

Post by Sektor »

It is possible to make anyone you punch explode, including random peds.

STORE_LAST_CHAR_PUNCHED ( char name , store name )

If you make them explode instantly then you will need to make yourself invulnerable but you could put a delay on it.

I used the STORE_LAST_CHAR_PUNCHED command to create my avatar. Everyone I punched got a flamethrower and joined my gang.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Script idea

Post by Cuban-Pete »

Gustavob wrote:I didnt get exactly what you mean. Do you mean like you punch and peds fly away, or like kinda remove the bullets/rockets/electricity from weapons? Or what? Plz explain, so I can actually see if its doable.
If it is possible that you change electric gun that every ped it touches gets an explosion (like hit with a rocket) so that you can "fire" like 5-10 peds at the same time in air. :D And if that is possible, perhaps remove the gun and apply this to a punch. So you are like almighty Silvester Stallone, you hit them all with a fake punch into the air, lol. :P
"Mmmm, your eyes are so beautiful."
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: Script idea

Post by Gustavob »

Well thats not possible to do, but as Sektor said, we can store the last punched character and make him explode. Would be funny, but its not possible to do with other weapons, the effect the weapons have in peds/players, unless theres a command that store last char we shoot in :P. Anyway its possible to do something like

Code: Select all

PLAYER_PED player1 = ( 61.5 , 195.5 , 2.0 ) 7 180
CHAR_DATA punched

LEVELSTART

IF ( HAS_CHAR_PUNCHED_SOMEONE ( player1 ) )
STORE_LAST_CHAR_PUNCHED ( player1 , punched )
SET_CHAR_INVINCIBLE ( player1 , ON )
DELAY_HERE (40)
EXPLODE_SMALL ( punched )
SET_CHAR_INVINCIBLE ( player1 , OFF )

LEVELSTART
Something like this might work

That will check if player has punched anyone (can include other players if it became a multiplayer level), make player invincible in case he did, waits a delay and explodes the ped, and if I put the correct delay in, ped will fly away. I had to put a delay because if we explode a ped wich is on floor after punch instantly, he will just explode. Try this: steal a ped car and before you get in the car, press enter again and some of the arrows and instantly shoot the ped. Only what will happen is that there will be an explosion in the ped and he will run away or attack you in case he has a pistol. Its needed to make player invincible in case he stays above the ped, so he wont fly with him
You just lost the game.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Script idea

Post by Cuban-Pete »

I haven't looked at coding GTA2, so I don't know how to use that code. Perhaps I should one day... :)

When you talk about entering car, that reminds me of multiplayer trick where you can kill someone with hitting him 'with the door'. When the other person is almost going to steal your car you need to exit the car and press hit with fist, timing is important. :)
"Mmmm, your eyes are so beautiful."
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: Script idea

Post by Gustavob »

peds-rain2.rar
Peds Rain 2
(3.72 KiB) Downloaded 936 times
Ok I made it. Its more complicated than the script on my last post but it includes all those commands :P . Also, this one includes all tiny town weapons and cars. This is what happens in this script: you punch a ped and the ped is stored as "punched" ped. The ped falls down and right when he rises up he explodes and flies away. Notice that if you punch a ped and when he is down you punch another ped, it wont work, only the first ped will explode and fly, you have to wait for him to explode and then punch another ped

EDIT: moved ENDWHILE one line before LEVELEND/one line after the SWITCH_GENERATORS, since the SWITCH_GENERATORS werent working (weapons werent spawning)
You just lost the game.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Script idea

Post by Cuban-Pete »

Haha, very funny effect. If you place the punch correct you can let a close by car explode. :)
"Mmmm, your eyes are so beautiful."
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: Script idea

Post by Gustavob »

Guys guys guys guys

I know I'm unearthing a 3 year old topic, but this GTA V cheats video instantly reminded me of this topic (start at 0:55; direct link):

You just lost the game.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Script idea

Post by elypter »

They are watching us
yur sa'nok ngeyä
Post Reply