GTAMP.com

Grand Theft Auto Media Press
It is currently Sat Jun 24, 2017 7:11 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sat May 27, 2017 10:31 pm 
Offline
Psycho

Joined: Tue Dec 06, 2011 4:54 pm
Posts: 76
I've been trying my hand at Scripting for GTA2 again, using one of the earlier renditions of Multislayer (which I played a lot in Single player many years ago).

I've been able to produce some pretty cool effects, like Suicide bombers (on foot) that explode upon reaching the player,
5 different assassins that swarm the player on level start, becoming invincible if the player dies & having a group added to their character, if each particular assassin dies that respawn as a downgraded form with no objective(plus a weaker weapon & standard gangster attire (whereas the Gang assassins have The EMERG_GRAPHIC remap, I'm using this to pretend they're the gang leaders).

I have a zombie gang in the graveyard that attacks the player on site, & a generator in the graveyard that turns all characters into muggers(Psychos) if destroyed (I used to use the buckfast cheat to pretend everyone in the city was zombies & I would play to see how long I could survive for, so this generator acts as a way to optionally turn it on at any point during gameplay).

A funny thing I noticed with this experimentation is some scripting weirdness which is actually pretty cool & you guys may have not known about;
If you have turn all characters into muggers both (ON) & (OFF) simultaneously in a loop, it'll create interesting behavior with dummy peds. The peds who spawn as Psychos don't attack the player or each other on sight, but if the player attacks the peds will rush him & punch him to the ground like a cop (or maybe they were doing that to gangsters but actually killing me). They also won't fight each other in this state so you can have like 10 dummy peds all chasing the player at once.

I also created some Terminator like characters similar to those in Snow Ball City 2; invulnerable Objectiveless guys that wander around & attack when attacked. Killing them turns on the Instant Gang generator they spawn at. I got this to work once but my latest version of the script doesn't seem to be activating the generator when I kill them.

The player starts out with an EMERG_GRAPHIC remap (Green vested Krishna), upon dying he looks like a standard Krishna. If you manage to kill a Terminator though you'll "level up" & become gang leader again by getting your Vest back.
(The Pherson Ghetto is the location of Krishna looking 'Thugs' gang)

I've also learned some cool scripting hacks you guys may or may not have known about involving NPCs with groups created for them.
Any group added to a character will have that character's remap & weapon.
However, if you create the character, create the group, & then remap the character & give the character a weapon (or different weapon) his gang can have completely different weapons & remaps then him. I've been using this to designate the gang leader with an EMERG_GRAPH remap.
One of my assassins is actually armed with an Electrobaton, & his group (following him in a chain) is unarmed, so he shoots the player to slow him down while they gang up on him & beat him up.
What I learned from all this though is when you kill a Group leader, another member of that group becomes that group leader;
Killing the leader of the gang with the electrobaton makes one of the cohorts instantly armed with it,
Similarly with a Flame thrower dude & his group.

It's the same with my Kamikaze guys, if you kill the group leader whose objective is to go to p1 on foot, causing him to explode, his lackey will continue the objective, being the one to explode instead. This is pretty cool because I have a second group comprised of 6 kamikazes who have a car bomb size explosion.

Speaking of my kamikazes, upon reaching their objective the loop caused them to explode indefinitely, which was pretty amusing as they soared through the air leaving a chain of explosions, but not what I had intended. So by setting a check to make the character have no objective upon reaching the player & then exploding, or having no objective upon dying, I was able to break the infinitely exploding corpse glitch.

Here's all the coding so far for anyone curious:
Quote:
(to make this more legible I removed Cerbera's original lines from the script so that only mine are visible)
OBJ_DATA Psychogen = (055.5,066.5) 0 POWERGEN


OBJ_DATA Pistcrate = (099.18,087.24) 0 Crate
OBJ_DATA Pistcrateproduct

//Gangs

MAP_ZONE Zombies //= (0,0,0,0,10,0,0,0,1000,0,0)
SET_GANG_INFO ( Zombies , 24, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , BMW , 1)
//
//MAP_ZONE Fire1
//SET_GANG_INFO ( Fire1 , 3, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
// 0.0, 0.0, 0.0, 00 , FIRETRUK , -1)
//
//MAP_ZONE Fire1
//SET_GANG_INFO ( Fire1 , 3, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
// 0.0, 0.0, 0.0, 00 , FIRETRUK , -1)
//
//
MAP_ZONE Police1 //= (500,0,0,500,100,0,0,0,500,400,500)
SET_GANG_INFO ( Police1 , 0, PISTOL, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , COPCAR , -1)
//
MAP_ZONE SubwayRats
SET_GANG_INFO ( SubwayRats , 14, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , STYPE , 1)
//
MAP_ZONE Thugs
SET_GANG_INFO ( Thugs , 9, PISTOL, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , STRIPETB , 29)
//
MAP_ZONE Shockers
SET_GANG_INFO ( Shockers , 12, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , ALLARD , 33)
////
MAP_ZONE Seniors
SET_GANG_INFO ( Seniors , 46, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , VAN , 16)
////
MAP_ZONE Reds
SET_GANG_INFO ( Reds , 30, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , ALFA , 28)
////
MAP_ZONE Bruisers
SET_GANG_INFO ( Bruisers , 22, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , DART , 32)
//
//MAP_ZONE Docks
//SET_GANG_INFO ( Docks , 33, PISTOL, NO_WEAPON, NO_WEAPON, 0 ,
// 0.0, 0.0, 0.0, 00 , PICKUP , 35)
//
//MAP_ZONE A2gang
//SET_GANG_INFO ( A2gang , 42, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
// 0.0, 0.0, 0.0, 00 , GRAHAM , 11)
//
//MAP_ZONE A4gang
//SET_GANG_INFO ( A4gang , 36, NO_WEAPON, NO_WEAPON, NO_WEAPON, 0 ,
// 0.0, 0.0, 0.0, 00 , ISETTA , 20)
//
MAP_ZONE Pinks
SET_GANG_INFO ( Pinks , 52, PISTOL, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , MESSER , 26)
//
MAP_ZONE Sharks
SET_GANG_INFO ( Sharks , 17, SHOTGUN, NO_WEAPON, NO_WEAPON, 0 ,
0.0, 0.0, 0.0, 00 , FIAT , 17)

// Players:
PLAYER_PED p1 = (103.5,090.5,255.0) 9 90

// Char Data:
//ASSASSINS
CHAR_DATA A2
CHAR_DATA A3
CHAR_DATA A3b
CHAR_DATA A4
CHAR_DATA A5
CHAR_DATA A6

CHAR_DATA B2
CHAR_DATA B3
CHAR_DATA B4
CHAR_DATA B5
CHAR_DATA B6

CHAR_DATA Term
CHAR_DATA Term2
CHAR_DATA Term3
CHAR_DATA Term4
CHAR_DATA Kazi1
CHAR_DATA KaziSupport
//CHAR_DATA Thug2
CHAR_DATA Carbomber
CHAR_DATA Flamer


// Code Looping:
COUNTER loopage = 1
Counter Crates = 1
//COUNTER playerdead = 1
COUNTER Kazico = 1
COUNTER regenerating_characters = 1
COUNTER Zombiezone = 1
COUNTER Termcount = 1

LEVELSTART

CHANGE_GANG_CHAR_RESPECT (Zombies, p1, -5)
CHANGE_GANG_CHAR_RESPECT (Thugs, p1, 5)


SET_CHAR_GRAPHIC_TYPE (p1, EMERG_GRAPHIC, 9)
GIVE_WEAPON (p1, PISTOL, 20)

// Assassins
// Create the killers:

A2 = CREATE_CHAR (072.5,094.5,255.0) 42 90 CRIMINAL END
SET_CHAR_GRAPHIC_TYPE (A2, EMERG_GRAPHIC, 41)
DO_NOWT
A3 = CREATE_CHAR (193.5,107.5,255.0) 22 0 CRIMINAL END
ADD_GROUP_TO_CHARACTER (A3, 3)
SET_GROUP_TYPE (A3, CHAIN)
SET_CHAR_GRAPHIC_TYPE (A3, EMERG_GRAPHIC, 22)
DO_NOWT
A4 = CREATE_CHAR (081.5,122.5,255.0) 36 90 CRIMINAL END
SET_CHAR_GRAPHIC_TYPE (A4, EMERG_GRAPHIC, 36)
DO_NOWT
A5 = CREATE_CHAR (182.0,162.5,255.0) 30 180 CRIMINAL END
SET_CHAR_GRAPHIC_TYPE (A5, EMERG_GRAPHIC, 30)
DO_NOWT
A6 = CREATE_CHAR (128.5,189.5) 46 90 CRIMINAL END
SET_CHAR_GRAPHIC_TYPE (A6, EMERG_GRAPHIC, 46)

// Arm the killers:
GIVE_WEAPON (A2, SILENCED_MACHINE_GUN)
GIVE_WEAPON (A3, ELECTRO_BATON)
GIVE_WEAPON (A4, MACHINE_GUN)
GIVE_WEAPON (A5, DUAL_PISTOL)
GIVE_WEAPON (A6, SHOTGUN)

// Make the killers attack any nearby player:
SET_CHAR_THREAT_SEARCH (A2, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_SEARCH (A3, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_SEARCH (A4, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_SEARCH (A5, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_SEARCH (A6, AREA_PLAYER_ONLY)

SET_CHAR_THREAT_REACTION (A2, REACT_AS_NORMAL)
SET_CHAR_THREAT_REACTION (A3, REACT_AS_NORMAL)
SET_CHAR_THREAT_REACTION (A4, REACT_AS_NORMAL)
SET_CHAR_THREAT_REACTION (A5, REACT_AS_NORMAL)
SET_CHAR_THREAT_REACTION (A6, REACT_AS_NORMAL)

SET_CHAR_OBJECTIVE (A2, KILL_CHAR_ON_FOOT, p1)
SET_CHAR_OBJECTIVE (A3, KILL_CHAR_ON_FOOT, p1)
SET_CHAR_OBJECTIVE (A4, KILL_CHAR_ON_FOOT, p1)

SET_CHAR_OBJECTIVE (A5, KILL_CHAR_ON_FOOT, p1)
SET_CHAR_OBJECTIVE (A6, KILL_CHAR_ON_FOOT, p1)


//Terminators

Term = CREATE_CHAR (184.0,137.0) 6 0 GUARD END
ADD_GROUP_TO_CHARACTER (Term, 2)
SET_GROUP_TYPE (Term, CHAIN)
SET_CHAR_GRAPHIC_TYPE (Term, EMERG_GRAPHIC, 6)
GIVE_WEAPON (Term, PISTOL)
SET_CHAR_THREAT_SEARCH (Term, NO_THREATS)
SET_CHAR_THREAT_REACTION (Term, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (Term, NO_OBJ)
SET_CHAR_INVINCIBLE (Term, ON)

Term2 = CREATE_CHAR (131.5,130.5) 12 0 GUARD END
//ADD_GROUP_TO_CHARACTER (Term2, 8)
//SET_GROUP_TYPE (Term2, MOB)
SET_CHAR_GRAPHIC_TYPE (Term2, EMERG_GRAPHIC, 12)
GIVE_WEAPON (Term2, ELECTRO_GUN)
SET_CHAR_THREAT_SEARCH (Term2, NO_THREATS)
SET_CHAR_THREAT_REACTION (Term2, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (Term2, NO_OBJ)
SET_CHAR_INVINCIBLE (Term2, ON)
ADD_CHAR_TO_GANG (Term2, Shockers)

Term3 = CREATE_CHAR (064.5,107.5) 11 0 GUARD END
ADD_GROUP_TO_CHARACTER (Term3, 4)
SET_GROUP_TYPE (Term3, MOB)
SET_CHAR_GRAPHIC_TYPE (Term3, EMERG_GRAPHIC, 11)
GIVE_WEAPON (Term3, SHOTGUN)
SET_CHAR_THREAT_SEARCH (Term3, NO_THREATS)
SET_CHAR_THREAT_REACTION (Term3, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (Term3, NO_OBJ)
SET_CHAR_INVINCIBLE (Term3, ON)

Term4 = CREATE_CHAR (129.0,166.0) 13 0 GUARD END
ADD_GROUP_TO_CHARACTER (Term4, 6)
SET_GROUP_TYPE (Term4, MOB)
SET_CHAR_GRAPHIC_TYPE (Term4, EMERG_GRAPHIC, 13)
GIVE_WEAPON (Term4, MACHINE_GUN)
SET_CHAR_THREAT_SEARCH (Term4, NO_THREATS)
SET_CHAR_THREAT_REACTION (Term4, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (Term4, NO_OBJ)
SET_CHAR_INVINCIBLE (Term4, ON)

Kazi1 = CREATE_CHAR (138.5,070.0) 7 0 PSYCHO END
ADD_GROUP_TO_CHARACTER (Kazi1, 1)
SET_GROUP_TYPE (Kazi1, MOB)
SET_CHAR_GRAPHIC_TYPE (Kazi1, EMERG_GRAPHIC, 7)
SET_CHAR_BRAVERY_LEVEL (Kazi1, COWARD)
SET_CHAR_THREAT_SEARCH (Kazi1, NO_THREATS)
SET_CHAR_THREAT_REACTION (Kazi1, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (Kazi1, GOTO_CHAR_ON_FOOT, p1)

KaziSupport = CREATE_CHAR (055.5,075.5) 7 0 CRIMINAL END
ADD_GROUP_TO_CHARACTER (KaziSupport, 4)
SET_GROUP_TYPE (KaziSupport, MOB)
SET_CHAR_GRAPHIC_TYPE (KaziSupport, EMERG_GRAPHIC, 7)
//SET_CHAR_BRAVERY_LEVEL (KaziSupport, COWARD)
SET_CHAR_THREAT_SEARCH (KaziSupport, NO_THREATS)
SET_CHAR_THREAT_REACTION (KaziSupport, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (KaziSupport, GOTO_CHAR_ON_FOOT, p1)

Flamer = CREATE_CHAR (014.5,143.0) 10 0 MUGGER END
ADD_GROUP_TO_CHARACTER (Flamer, 3)
SET_GROUP_TYPE (Flamer, MOB)
GIVE_WEAPON (Flamer, FLAME_THROWER)
SET_CHAR_GRAPHIC_TYPE (Flamer, EMERG_GRAPHIC, 10)
//SET_CHAR_BRAVERY_LEVEL (Kazi1, COWARD)
SET_CHAR_THREAT_SEARCH (Flamer, NO_THREATS)
SET_CHAR_THREAT_REACTION (Flamer, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (Flamer, NO_OBJ)


SWITCH_GENERATOR (pupgen_gang_2, OFF)
SWITCH_GENERATOR (pupgen_gang_2, OFF)
SWITCH_GENERATOR (pupgen_gang_3, OFF)
SWITCH_GENERATOR (pupgen_gang_4, OFF)

//WHILE (crates = 1)

//ENDWHILE

// Respawn each killer if they die:
WHILE_EXEC(regenerating_characters = 1)
IF (HAS_CHARACTER_DIED(A2))
A2 = CREATE_CHAR (072.5,094.5,255.0) 42 90 MUGGER END
GIVE_WEAPON (A2, PISTOL)
ADD_GROUP_TO_CHARACTER (A2, 1)
SET_GROUP_TYPE (A2, MOB)
//SET_CHAR_GRAPHIC_TYPE (A2, EMERG_GRAPHIC, 42)
GIVE_WEAPON (A2, PISTOL)
SET_CHAR_THREAT_SEARCH (A2, NO_THREATS)
SET_CHAR_THREAT_REACTION (A2, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (A2, NO_OBJ)
ENDIF
IF (IS_CHAR_OBJECTIVE_PASSED (A2))
//REMOVE_WEAPONs (A2)
SET_CHAR_OCCUPATION (A2, MUGGER)
SET_CHAR_OBJECTIVE (A2, NO_OBJ)
ADD_GROUP_TO_CHARACTER (A2, 2)
SET_GROUP_TYPE (A2, CHAIN)
SET_CHAR_THREAT_SEARCH (A2, NO_THREATS)
SET_CHAR_THREAT_REACTION (A2, REACT_AS_NORMAL)
SET_CHAR_INVINCIBLE (A2, ON)
ENDIF
//

IF (HAS_CHARACTER_DIED(A3))
A3 = CREATE_CHAR (193.5,107.5,255.0) 22 0 CRIMINAL END
ADD_GROUP_TO_CHARACTER (A3, 5)
SET_GROUP_TYPE (A3, CHAIN)
SET_CHAR_GRAPHIC_TYPE (A3, EMERG_GRAPHIC, 22)
GIVE_WEAPON (A3, ELECTRO_BATON)
SET_CHAR_THREAT_SEARCH (A3, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (A3, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (A3, NO_OBJ)
ENDIF
IF (IS_CHAR_OBJECTIVE_PASSED (A3))
//REMOVE_WEAPONs (A3)
SET_CHAR_OCCUPATION (A3, MUGGER)
SET_CHAR_OBJECTIVE (A3, NO_OBJ)
//DESTROY_GROUP (A3)
SET_CHAR_THREAT_SEARCH (A3, NO_THREATS)
SET_CHAR_THREAT_REACTION (A3, REACT_AS_NORMAL)
A3b = CREATE_CHAR (193.5,108.5,255.0) 22 0 CRIMINAL END
ADD_CHAR_TO_GANG (A3b, Bruisers)
ADD_GROUP_TO_CHARACTER (A3b, 7)
SET_GROUP_TYPE (A3b, MOB)
GIVE_WEAPON (A3b, ELECTRO_BATON)
SET_CHAR_GRAPHIC_TYPE (A3b, EMERG_GRAPHIC, 22)
SET_CHAR_THREAT_SEARCH (A3b, NO_THREATS)
SET_CHAR_THREAT_REACTION (A3b, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (A3b, NO_OBJ)
SET_CHAR_INVINCIBLE (A3b, ON)
ENDIF
////IF (IS_CHAR_OBJECTIVE_PASSED (B3))
////REMOVE_WEAPONs (B3)
////SET_CHAR_OCCUPATION (B3, MUGGER)
////SET_CHAR_OBJECTIVE (B3, NO_OBJ)
////DESTROY_GROUP (B3)
////SET_CHAR_THREAT_SEARCH (B3, NO_THREATS)
////SET_CHAR_THREAT_REACTION (B3, REACT_AS_NORMAL)
////ENDIF
//
IF (HAS_CHARACTER_DIED(A4))
//SET_CHAR_GRAPHIC_TYPE (p1, EMERG_GRAPHIC, 9)
A4 = CREATE_CHAR (081.5,122.5,255.0) 36 90 MUGGER END
GIVE_WEAPON (A4, ELECTRO_BATON)
ADD_GROUP_TO_CHARACTER (A4, 1)
SET_GROUP_TYPE (A4, MOB)
GIVE_WEAPON (A4, PISTOL)
//SET_CHAR_GRAPHIC_TYPE (A4, EMERG_GRAPHIC, 36)
SET_CHAR_THREAT_SEARCH (A4, NO_THREATS)
SET_CHAR_THREAT_REACTION (A4, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (A4, NO_OBJ)
ENDIF
IF (IS_CHAR_OBJECTIVE_PASSED (A4))
//REMOVE_WEAPONs (A4)
SET_CHAR_OCCUPATION (A4, MUGGER)
SET_CHAR_OBJECTIVE (A4, NO_OBJ)
ADD_GROUP_TO_CHARACTER (A4, 2)
SET_GROUP_TYPE (A4, CHAIN)
//MAKE_CHAR_DO_NOTHING (A4)
SET_CHAR_THREAT_SEARCH (A4, NO_THREATS)
SET_CHAR_THREAT_REACTION (A4, REACT_AS_NORMAL)
SET_CHAR_INVINCIBLE (A4, ON)
//GIVE_WEAPON (A4, Pistol)
ENDIF

IF (HAS_CHARACTER_DIED(A5))
A5 = CREATE_CHAR (182.0,162.5,255.0) 30 180 MUGGER END
GIVE_WEAPON (A5, DUAL_PISTOL)
SET_CHAR_THREAT_SEARCH (A5, NO_THREATS)
SET_CHAR_THREAT_REACTION (A5, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (A5, NO_OBJ)
ENDIF
IF (IS_CHAR_OBJECTIVE_PASSED (A5))
//REMOVE_WEAPONs (A5)
SET_CHAR_OCCUPATION (A5, MUGGER)
SET_CHAR_OBJECTIVE (A5, NO_OBJ)
ADD_GROUP_TO_CHARACTER (A5, 2)
SET_GROUP_TYPE (A5, CHAIN)
GIVE_WEAPON (A5, MACHINE_GUN)
SET_CHAR_THREAT_SEARCH (A5, NO_THREATS)
SET_CHAR_THREAT_REACTION (A5, REACT_AS_NORMAL)
SET_CHAR_INVINCIBLE (A5, ON)
ENDIF

IF (HAS_CHARACTER_DIED(A6))
A6 = CREATE_CHAR (128.5,189.5) 46 90 MUGGER END
GIVE_WEAPON (A6, SHOTGUN)
SET_CHAR_THREAT_SEARCH (A6, NO_THREATS)
SET_CHAR_THREAT_REACTION (A6, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (A6, NO_OBJ)
ENDIF
IF (IS_CHAR_OBJECTIVE_PASSED (A6))
//REMOVE_WEAPONs (A6)
SET_CHAR_OCCUPATION (A6, MUGGER)
SET_CHAR_OBJECTIVE (A6, NO_OBJ)
ADD_GROUP_TO_CHARACTER (A6, 2)
SET_GROUP_TYPE (A6, CHAIN)
SET_CHAR_THREAT_SEARCH (A6, NO_THREATS)
SET_CHAR_THREAT_REACTION (A6, REACT_AS_NORMAL)
SET_CHAR_INVINCIBLE (A6, ON)
ENDIF

IF (IS_CHAR_OBJECTIVE_PASSED (Kazi1))
SET_CHAR_OBJECTIVE (Kazi1, NO_OBJ)

EXPLODE (Kazi1)
DESTROY_GROUP (Kazi1)
ENDIF
IF (HAS_CHARACTER_DIED(p1))
SET_CHAR_OBJECTIVE (Kazi1, NO_OBJ)
ENDIF

IF (IS_CHAR_OBJECTIVE_PASSED (KaziSupport))
SET_CHAR_OBJECTIVE (KaziSupport, NO_OBJ)

EXPLODE_LARGE (KaziSupport)
DESTROY_GROUP (KaziSupport)
ENDIF
IF(HAS_CHARACTER_DIED(p1))
SET_CHAR_OBJECTIVE (Kazisupport, NO_OBJ)
ENDIF

IF (CHECK_OBJ_MODEL (Psychogen, POWERGEN))
DO_NOWT
//CREATE_SOUND(055.5,066.5) GENERATOR_RUMBLE PLAY_INSTANT END
//MAKE_ALL_CHARS_MUGGERS (OFF)
ELSE MAKE_ALL_CHARS_MUGGERS (ON)
ENDIF



IF (HAS_CHARACTER_DIED(Term))
DO_NOWT
SET_CHAR_GRAPHIC_TYPE (p1, EMERG_GRAPHIC, 9)
SWITCH_GENERATOR (pupgen_gang_1, ON)
ENDIF

IF (HAS_CHARACTER_DIED(Term2))
DO_NOWT
CHANGE_GANG_CHAR_RESPECT (Shockers, p1, -5)
SET_CHAR_GRAPHIC_TYPE (p1, EMERG_GRAPHIC, 9)
SWITCH_GENERATOR (pupgen_gang_2, ON)
ENDIF

//IF (HAS_CHARACTER_DIED(Term3))
//DO_NOWT
//SET_CHAR_GRAPHIC_TYPE (p1, EMERG_GRAPHIC, 9)
//CREATE_OBJ (pupgen_gang_3, ON)
//ENDIF

IF (HAS_CHARACTER_DIED(Term4))
DO_NOWT
SET_CHAR_GRAPHIC_TYPE (p1, EMERG_GRAPHIC, 9)
SWITCH_GENERATOR (pupgen_gang_4, ON)
ENDIF
ENDWHILE

Any suggestions on why exactly my Instant gangs may not be turning on once the respective Terminator is killed?

I also discovered some interesting things with gang zones, in that you can have multiple small boxes of different shape next to each other all under one gang name but once you've created so many gang zones the game will crash. Reworking the gang zones to all only be perfect squares/rectangles has prevented this.However, looking back at my code, I wonder if it's because I declared the fireman gang twice, when I only would have needed to declare them once despite their respective zones being across the map from each other. I'll test this out.

Currently I'm trying to make crates that produce weapons upon being broke, like in GTA1. However upon being destroyed it continues to produce the weapon indefinitely, which is not what I'm hoping for. I want it to be a one time thing. Do you know how I could go about doing this? This is my code currently,
Quote:
IF (CHECK_OBJ_MODEL (Pistcrate, Crate))
DO_NOWT

ELSE Pistcrateproduct = CREATE_OBJ (099.18,087.24,003.09) 0 COLLECT_00 20 END
DELETE_ITEM (pistcrate)
ENDIF


I look forward to your input.
(Also with Cerbera's permission I could upload the version of Multislayer I'm using here as well as the .mis script. I haven't tried this particular script yet in the latest version of MS & I know the maps a bit different in size so it may not work with it as intended)

EDIT:
So I'm pretty sure my biggest issue is I'm running all events off of one loop. This makes it impossible to say create for example a new assassin if the old one has died, because the loop keeps seeing the old guy died & then spawns a million Assassin B2s for example, crashing the game. I don't know how to make sequential events happen yet.

Also, I discovered a cool map design exploit you guys may be able to use.
I was redesigning the Mutlislayer map to make the Pherson ghetto a giant scripted survival / tower defense arena.
So, being new to GTA2 map editing, I added a few blocks to wall off the ghetto area.
The stairs to the south east I didn't delete, I just added blocks to bar it off. So, above the slope is a floating block. I was using my same .mis script for the old map, so my assassins were still spawning in the multiplayer locations & making their way towards me.
Naturally you would assume they couldn't get in, because I nor anyone else can get out.
However, due to the block hovering just above the ramp, they can come up the stairs & through the block, but not back out.
If you are ever to design arena based maps that you don't want to spawn scripted characters inside of the main area, you can use this to bring them into the arena from off screen.
Here's a screenshot demonstrating the exact layout needed,


Attachments:
File comment: One way entrance
GTA2Arena.jpg
GTA2Arena.jpg [ 239.63 KiB | Viewed 555 times ]
Top
 Profile  
 
PostPosted: Wed May 31, 2017 5:44 am 
Offline
Psycho

Joined: Tue Dec 06, 2011 4:54 pm
Posts: 76
Guys I definitely need some help here. I've been designing my very first multiplayer level & it's almost ready to upload, but there's some scripting info I don't know how to execute yet.

My question is, is it possible to make it so that when a player dies they're given a weapon upon respawn? I've seen weapons after death with things like the GTA1 maps in GTA2, but those have infinite ammo. I want ammo to be finite with each life the player has. If I really have to I'll go the infinite ammo route, but I'd prefer the limited ammo to contribute to the tension I'm hoping this level conveys.
I'll take a look at those GTA1 to 2 maps & see if there's anything in that code I could repurpose.

EDIT: Nevermind, I used a trigger at player starting/respawn point to give the weapon. This area isn't accessible once the main arena has been entered anyway. I'll playtest my map tonight with my brother, & then upload it here if I feel it's satisfactory. It's amazing how much you can accomplish in two days.

Now I'll start on my second map ever, which will be for multiplayer as well.


Top
 Profile  
 
PostPosted: Thu Jun 01, 2017 3:39 pm 
Offline
Psycho

Joined: Tue Dec 06, 2011 4:54 pm
Posts: 76
Alright so there's a few things I have yet to do before I can launch the first version of my map (there will be four play style versions of it total), but the problem is I want the gameplay of the first three to have stealth elements. I know I can turn off arrow pointers by making the respective graphics in the sty files transparent, but is there anyway to turn off player display names? Or do I have to delete text out of the sty file? If I do so will that affect players ability to type to each other/ or the game to display weapon names?

EDIT:
Here's a teaser from the arena I've been working on (top left corner is warped due to the FN button distorting my screen in GTA2 when held down)


Attachments:
Shhhh.png
Shhhh.png [ 445.06 KiB | Viewed 501 times ]
Top
 Profile  
 
PostPosted: Fri Jun 02, 2017 1:14 am 
Offline
Psycho

Joined: Tue Dec 06, 2011 4:54 pm
Posts: 76
I just discovered a way to do super jumps. I was setting up some conveyors & an accidental misplacement revealed this nifty trick to me.
Normal jumps clear a two block area, from the outer edge of the first block to the outer edge of the second, roughly.
If you have a one block slope with a conveyor on it (set to speed 6!) the conveyor will accelerate you up the ramp as you run towards it, & if you time the jump perfectly you'll land on the outer edge of the third block, or if you're really lucky dead center in a third block! It will remove half a heart however.
I'm definitely gonna incorporate this into a jump/platform centric map I intend to design soon.

Correction: You won't lose half a heart.


Top
 Profile  
 
PostPosted: Sat Jun 17, 2017 11:39 pm 
Offline
Psycho

Joined: Tue Dec 06, 2011 4:54 pm
Posts: 76
I know for a fact I saw someone post code on here that med all dummy peds have the green remap & attack the player on sight. I cannot find it for the life of me now. Does anyone know how I can make all dummies attack the players? Pyschos wouldn't work for what I have in mind.


Top
 Profile  
 
PostPosted: Sun Jun 18, 2017 12:14 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1256
Location: GTAMP.com
That was the zombie script viewtopic.php?f=5&t=171&p=1832

I just created a gang zone that covers the whole map, gave them no weapons and set their respect for the player to be -5.

If you change player speed then you will jumper further without having to use a conveyor. viewtopic.php?p=10011#p10011

Devastator wrote:
I know I can turn off arrow pointers by making the respective graphics in the sty files transparent, but is there anyway to turn off player display names? Or do I have to delete text out of the sty file? If I do so will that affect players ability to type to each other/ or the game to display weapon names?

You can now turn off all arrows using script instead of editing the STY file: viewtopic.php?p=10212#p10212

I'll see if I can find the hide player names address, it would be good for switching names on/off during gameplay. You can just set your name to blank if you don't want other players to see it or ask everyone to untick show player names but that means it will be hidden the whole game and not dynamic.


Top
 Profile  
 
PostPosted: Sun Jun 18, 2017 3:08 pm 
Offline
Psycho

Joined: Tue Dec 06, 2011 4:54 pm
Posts: 76
It wasn't that script. The poster actually posted a pic of all the green peds chasing him. He actually used peek & poke to do it. I'll have to keep looking. Currently I also have a giant zombie gang zone, but like Pyro points out in another thread only like four gang members will chase you at once, & the other ones will run away when you fire a gun.

I was surprised to learn that there hasn't been a lot of zombie maps. Currently my map is a huge chunk of Downtown with everything else deleted. There's a huge perimeter wall surrounding the play area with an armygang on the outside of it(that you can never reach). The central hub is that mall that has all the catwalks that go over the streets. I know nothing about mission structure to make the map how I would like to though. I want to implement a timer system where you have to defend the base from different Waves of attack, especially the scripted people who are alive inside of it. I also have a Survivalist gang whose base is the Police Station above the church, but they're going to be located in small fortified pockets around the city, & when you kill each boss (armed with a different heavy weapon) it'll turn on a weapon generator back at the home base, that you can then use for defending against the attacking waves. I'm going to station molotov army guys atop the perimeter wall to create that sense of them trying to keep everything in contained. & took the tedious time to turn every swath of road into pavement so that there is a way higher count of zombie gangmembers walking the streets. Maybe I'll be able to do more with it when I figure out how to do mission triggers.


Top
 Profile  
 
PostPosted: Sun Jun 18, 2017 11:47 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1036
there is a thread discussing zombie maps. viewtopic.php?f=19&t=596 and a project thread viewtopic.php?f=5&t=171

what made it fail for me was mostly time and the problem with the gang zone method. it wast very challenging and didnt have a zombie feeling to it. but with peek and poke commands this can now be fixed

_________________
yur sa'nok ngeyƤ


Top
 Profile  
 
PostPosted: Tue Jun 20, 2017 6:19 pm 
Offline
Psycho

Joined: Tue Dec 06, 2011 4:54 pm
Posts: 76
Could you guys create a "KILL_CHAR_IN_CAR" command? A sort of equivalent to KILL_CHAR_ON_FOOT? I'm trying to create a suicide bomber driver & what I was going to do was force the character to be locked in the car, with KILL_CHAR_ANY_MEANS as his objective. This is useful for creating someone who is trying to run you down, however, What I was going to do was make it so that once he accelerates towards you to run you over (which is faster than their default drive speed) I was going to do a speed check to cause the car to explode, that way a flaming mass is hurling towards you. The problem is, as soon as the car teleports, as is common with the KILL_CHAR_ANY_MEANS command, the speed exceeds the speed check, causing it to explode upon warping, crashing the game in this last instance.

Having a kill_char_in_car command would be useful for creating drivers across the city coming to hunt you down. Kill_char_any_means can be a bit broken with it's teleportation, especially because the way some of my scripted characters are set up they'll teleport in front of the hospital you respawn at to effectively spawn kill you, which can be amusing but unbalanced feeling.


Top
 Profile  
 
PostPosted: Tue Jun 20, 2017 7:04 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1036
i created a scripted wanted level 7 and 8 for tinytinytown army. this included suicide bombing army vehicles. i dont remember how i did it. it didnt hit every time but that was ok since i didnt want to make it too hard

_________________
yur sa'nok ngeyƤ


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group