A Coin Distraction

Coin Drop

Like any good stealth game, you need some sort of distraction system. This is exactly that. So how does it work?

The idea is when the player presses the right mouse button, Darren “throws” a coin at said location and the guards hear it and get distracted allowing him to sneak through.

Left: Player Method on throwing the coin. Right: Action (Method) that is called on the Guards

The left picture is on the Player script. It uses the same system of Raycasting as how the player moves. Based on where the player clicks it Instantiates an Object at that location, playing a sound, animation and broadcasting an Action to the Guards to move to that location. The Action that was set up, is sending a Vector3 and Bool to the guards to notify them that the coin was indeed tossed and at what location. It then sets their destination to that position and they all run over there distracted.

With this, that’s another part of the project down. Next setting up the cameras.




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

We have wonderful news!

Victoria VR MEGA Giveaway

How to Prevent Online Breaches

BitCashPay Update

Volunteer Cyber Armies Are Dangerous!

Cyber Research #15

KYC Requires Checking For Synthetic Identities

SentiLink has verified over 100M identities

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Brennen Witzens

Brennen Witzens

More from Medium

My journey becoming a Unity game developer: 2.5D Infinite Runner-Ledge Grab System-Pt2

Starting to Feel like a Real Video Game!

Starting your first Unity Game!

How to Swap Action Maps