• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Arcade Shooter

Level 5
Joined
Mar 15, 2008
Messages
35
Arcade Shooter

Difficulty - You'll need to be familiar with making triggers.

I had this idea while playing Time Crisis at an arcade, it's the same on House of the Dead on the Nintendo Wii. It came out quite well and I figured I'd share it with the community. I'm looking for feedback.

For those who have never played an arcade game like Time Crisis, House of the Dead or even one of the old Resident Evils, download the attachment and play it then see if you want to spend your precious time doing this.


Stage 1: Camera

The camera is probably the most important thing for making an arcade-style shooter; it's the fact its fixed that does it. Basically, the camera is in a first-person style, but without the gun showing up.
When playing, the player will be in certain areas which, I refer to as Combat Zones (CZ), and in each one of these is a locked camera. Set all of these up first. You'll want them to be behind cover like a real person would be in real life. For example, behind some barrels.
You can see a camera behind those barrels. When locked, it will look like your player is standing/crouching behind them for cover.
WC3TUT001.jpg

A combination of these creates a lot of different Combat Zones (CZ) which, when strung together by triggers and with some added waves of hostiles, creates an arcade level. Try to keep the camera at the same height and use gradual movements to make it feel first-person. I really have to stress that, as it looks pathetic if the camera goes really fast over some building to the next CZ and instantly ruins the First-Person Arcade Shooter effect.
If you want to add an extra effect, you can add camera shaking, Magnitude 1, while the camera moves to the next CZ.


I personally use time triggers for my CZ's. That way, my player stays shooting at enemies for around 20 seconds before cinematically running to the next CZ.
Here's a small bit of a trigger that works for the cameras.
  • Events -
  • Time - Elapsed game time is 58.00 seconds
  • Conditions -
  • Actions -
  • Cinematic - Turn cinematic mode On for (All players)
  • Camera - Shake the camera for Player 1 (Red) with magnitude 1.00
  • Camera - Apply Camera 008 <gen> for Player 1 (Red) over 2.00 seconds
  • Wait 1.99 seconds
  • Camera - Stop swaying/shaking the camera for Player 1 (Red)
  • Cinematic - Turn cinematic mode Off for (All players)
That usually has lots of trigger on and trigger off actions for spawns but I take it you get the idea.


Stage 2: Units

I used zombies, but feel free to use any type of melee unit. You'll want to make them slow moving so the player can have time to react, especially if your hostiles come from around the corners. It's the trigger work that's tedious here. You'll need to make a category for this and have comments separating the different CZ's in order to fix any bugs in the scripting easier. Your first trigger will be the initial spawn. Try not putting too many in (Unless the intention is to make the player feel overwhelmed) 3 is a good number or 5 if it's a hard group that will come at the player from a long distance. From then, you'll want to have a separate trigger which will respawn the hostiles. You'll need the spawn/respawn region to be out of the player's sight (Only while they're in that CZ).

Combat Zone 1 (Category)
- CZ1 Spawn1 (Trigger)
  • Events
    • Time - Every 0.10 seconds of game time
  • Conditions
  • Actions
    • Unit - Create 3 Zombie for Player 12 (Brown) at (Center of CZ1 Spawn1 <gen>) facing 90.00 degrees
    • Unit - Create 3 Zombie for Player 11 (Dark Green) at (Center of CZ1 Spawn2 <gen>) facing 90.00 degrees
    • Trigger - Turn off (This trigger)
---RESPAWN---
  • CZ1 Spawn2
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Zombie
    • Actions
      • Wait 1.00 seconds
      • Unit - Create 1 Zombie for Player 12 (Brown) at (Center of CZ1 Spawn1 <gen>) facing 0.00 degrees

It is as simple as that. Once you're done with that CZ, turn those triggers off. Turn your CZ Transition (camera) trigger on, and then your next CZ. It's simple yet fun.

Stage 3: Shooting


It wouldn't be a shooter without it and to me this part is why I'm proud of my map. You can have multiple weapons, as in the attached demo, if you really want to. But if you're just keeping it simple and sharing this map with your mates, then you might as well just keep it to the pistol.
Depending on your choice, you may want to make your weapon Instant-Kill, but I prefer to have it damaged based so I can include bosses. The trigger is remarkably simple.

  • ShootPistol
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • ((Unit-type of (Triggering unit)) Equal to Zombie) or ((Unit-type of (Triggering unit)) Equal to BOSS (cinematic))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current gold) Equal to 0
        • Then - Actions
          • Game - Display to (All players) the text: Press The - Down Ar...
        • Else - Actions
          • Trigger - Turn off (This trigger)
          • Selection - Clear selection for Player 1 (Red)
          • Sound - Stop Shoot <gen> Immediately
          • Sound - Play Shoot <gen>
          • Wait 0.20 seconds
          • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 50.00 damage of attack type Normal and damage type Normal
          • Player - Add -1 to Player 1 (Red) Current gold
          • Wait 0.35 seconds
          • Trigger - Turn on (This trigger)
This is an extract from the demo level and therefore mentions gold and lumber. That is what I use for ammo. I will explain that later.
I use 50 damage for the gun. This trigger is for the pistol. The Assault Rifle does 100 damage, adding variety to my level. Note it plays a sound. It's a little bit of a pain to do as I'd forgotten to make the sound NOT 3D at the time. But by increasing the pitch of the rifleman's attack I made the sound seem like a pistol. You can download free sound effects for your guns and add reload noises if you want, but I stuck to Blizzards as this is a demo level. There's a Unit-Type condition because I'd planned on adding civilians for effect but never bothered...

Ammo

The ammo makes the game feel even more arcade-like.
I used gold as Bullets-per-round as gold and Lumber as magazines. Variables manage these. I used 2 scripts for security and to eliminate cheating. The pistol holds 12 rounds and you start with 6 extra Magazines. When your rounds hit 0, you have to reload. I used the Down Arrow Key for this. And when your Magazines hit 0, you're out of ammo. If you have an exceptionally long level, you might want to implement something such as every 10 kills rewarding a magazine or something where you can click floating magazines to receive some, but it is up to you. My demo level was short, however, and combined with the Assault Rifle, you had enough ammo to last.
Here are the two scripts for reloading:
  • ReloadPistol1
    • Events
      • Player - Player 1 (Red) Presses the Down Arrow key
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • W_PistolClips Not equal to 0
        • Then - Actions
          • Trigger - Turn on ReloadPistol2 <gen>
        • Else - Actions
          • Game - Display to (All players) the text: You're out of Magaz...
AND
  • ReloadPistol2
    • Events
      • Player - Player 1 (Red) Releases the Down Arrow key
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Reloading!
      • Wait 1.00 seconds
      • Player - Set Player 1 (Red) Current gold to 12
      • Player - Add -1 to Player 1 (Red) Current lumber
      • Set W_PistolClips = (Player 1 (Red) Current lumber)
      • Trigger - Turn off (This trigger)
That's the reload scripts done.

----- By this time you should have made your CZs, your cameras, your hostiles (and their spawn points and respawns), and your shooting and ammo scripts. Now for the finishing touches.

Stage 4: Miscellaneous

This is minor, yet VITAL for this to be an arcade shooter!
Go to your game interface and change your cursor to the Target model I've attached. It will give you a cross-hair as your cursor, adding just a little bit more Arcade Style to the map. It wouldn't look complete without it.
If you want to get serious you could use text messages as a kind of "Heads up Display" for displaying your ammo and your Magazines.


----- !Good Luck! -----
 

Attachments

  • CrosshairCursor.mdx
    3.2 KB · Views: 449
  • (1) First Person Shooter V2.w3x
    221.7 KB · Views: 556
  • (2) First Person Shooter V3.w3x
    227.1 KB · Views: 754
Last edited:
Level 5
Joined
Mar 15, 2008
Messages
35
It is possible to make it multiplayer. If you add a kills counter it'll improve the fun but the problem is it'll take twice as long if your gonna make 2 routes. But if your fine using the same cameras it shouldn't be too hard. I'll work on making the demo level 2 player. If it works I'll attach it. And about the waits. The DEMO map was my experimenting around with the triggers I left some stuff in there that doesn't matter.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Actually, min wait is 0.27
Actually, min. wait is somewhere between 0.06 and 0.15, depending on how 'stressed' the game is.

When I tested this using some actual functions, I always came to the same results (I tested the avarage out of 1000 waits, the minimum and the maximum).

Wait Time: 0.01 secWait Time: 0.10 secWait time: 0.20 sec
Avarage Wait:13.56 sec22.43 sec31.91 sec
Minimum Wait:0.06 sec0.16 sec0.27 sec
Maximum Wait:0.20 sec0.29 sec0.37 sec
(This test was done with a code that was as clean as possible).

Things that matter: the more triggers are running, the slower the wait is.
 
Sorry for the long delay, I didn't see this for a while. I made grammatical fixes, but the images need to be attached to the Hive in your post. (not from photobucket/imageshack etc.)

Do that and it will be good for approval. =)

EDIT: ~Graveyarded for now, just notify me if you are willing to attach the images. Sorry, the rules are the rules. :\
 
Last edited:
Level 4
Joined
Feb 26, 2015
Messages
70
this is quite amazing, great triggers, the only problem i see is after the game is done at back at the TFT original page; you can't see your mouse cursor anymore.

I would really like to see this to be a full finished game, deffinatly Wc3 needs a new game style
 
Top