Sketch of a "Counter-Strike mode" in GTA2 scripting

Post GTA1/GTA2 maps here (finished and work in progress).
Post Reply
valps
Jaywalker
Jaywalker
Posts: 6
Joined: 31 Dec 2020, 15:03
GH nick: Valps

Sketch of a "Counter-Strike mode" in GTA2 scripting

Post by valps »

I'm making a new map which I will release soon. One of the game modes will be like a Counter-Strike:

- No cars;
- No NPCs;
- Two teams, T: terrorists, CT: counter-terrorists
- Only weapons available: (silenced) machine guns, (dual) pistols, grenades and shotguns;
- One respawn only: outside the arena in a waiting room
- Maximum: 6 players (T - CT - T - CT - T - CT)

- One terrorist will have the bomb. If he dies, a new bomb spawn in their base. (Ideally I want to respawn the bomb in their death point or somewhere near, but this is provisional)
- One counter-terrorist will have the defuse kit. If he dies, a new kit spawn in their base. (the kit is displayed as a briefcase)

- The terrorist which have the bomb will be marked with an arrow.
- The counter-terrorist which have the defuse kit will be marked with an arrow as well.

- The bomb can be placed in two locations. After that, no one can move it to the other location.

Timing: (provisional)

- Arm the bomb: 5 seconds
- Disarm the bomb: 7 seconds
- Time to explode: 35 seconds

Win condition:

- Terrorists will win if all counter-terrorist are dead or if the bomb was planted and explodes. A message of "Job Failed" will show to everyone.
- Counter-terrorists will win if the bomb was disarmed or if all terrorist are dead and the bomb wasn't planted. A message of "Job Complete" will show to everyone.

- After one of the wins conditions was reached, the game will close automatically.

So I will annex a test map to everyone test. Anyone can copy or use the script code without asking any permissions. But I recommend it's better wait until all bugs were fixed (otherwise you can fix them as well).

The test map is just a tiny arena and everyone will receive machine-gun at start. However I'm finishing a real arena to use this script, so you all can find bugs while I complete the map. I'm accepting suggestions as well, about the CS mode or the scripting code.

Known issues:
- The disarm timer and the bomb timer may sometimes desync a bit in multiplayer.
- If you play singleplayer by clicking "Play Alone" in GH, the bomb timer will surely desync. I adjusted the timers in script thinking in multiplayer, which seems to have less game-cycles per second.
- Don't care about the unnecessarily repeated "IF"s in the script, it's just that I've lost some confidence in ORs and ANDs :mrgreen:
- If you think that its not fair more terrorists than counter-terrorists in case of odd players number, you can switch the player spawn lines in the script. I created the code such that it don't cares about the order (but tell me if I'm wrong about that).
Attachments
counter_strike_test_map.rar
A map to test the script
(2.11 MiB) Downloaded 103 times
valps
Jaywalker
Jaywalker
Posts: 6
Joined: 31 Dec 2020, 15:03
GH nick: Valps

Re: Sketch of a "Counter-Strike mode" in GTA2 scripting

Post by valps »

Update: Now players are forced to stay immobile (i.e. to not shoot and not move) to arm/defuse the bomb.
Attachments
counter_strike_test_map_0_1.rar
(2.11 MiB) Downloaded 92 times
DodoPlane601
Jaywalker
Jaywalker
Posts: 5
Joined: 21 Dec 2021, 21:16
GH nick: GTAExpert69
Location: Moldova Republic of
Contact:

Re: Sketch of a "Counter-Strike mode" in GTA2 scripting

Post by DodoPlane601 »

I tried your map and it's much better looking.
Edit: Can you remake de_dust and publish it?
valps
Jaywalker
Jaywalker
Posts: 6
Joined: 31 Dec 2020, 15:03
GH nick: Valps

Re: Sketch of a "Counter-Strike mode" in GTA2 scripting

Post by valps »

v0.2 - What's new?

- Terrorists now uses the Krishna skin and Counter-terrorists uses Yakuza skin. This change will attach gang arrows to the players, so the Bomber/Defuser arrows will be identified properly;
- Bomb timer disappears after the explosion;
- A tic-tac sound is played during bomb countdown.
- Now the map has 2 locations. If the bomb/defuser has dropped in Location 1, it will respawn somewhere in Location 1. Analogously with Location 2. Otherwise it will respawn at (counter)-terrorist base.

Edit: Yes, I can recreate de_dust in GTA2, but I'm very busy recently. Perhaps in december I will have some free time to do.
Attachments
counter_strike_test_map_0_2.rar
Counter Strike Script Test v0.2
(2.11 MiB) Downloaded 64 times
Post Reply