The Tiñaana Punching Mechanic

Suddenly, you hear distant dinosaur noises, maybe from an iPad or phone

Suspnded_Arr0w_Shaft: WAKE UP, TIÑAANA


TinanYx: My ears. Why did you just have to yell?


Suspnded_Arr0w_Shaft: Because you need to get off the couch, stop watching Chaos Theory, and get this guide done with.


TinanYx: Ugh, fine. Okay, here we go!


Introduction

Today we will be making a punching/slapping mechanic.
:warning: Warning: This system takes quite a bit of memory
:warning: Warning 2: With this setup, only 3 people can play, but it is easy to add to the max player amount

Devices Needed

Properties (3 + 2 per amount of player slots)
1 Coordinate Tracker.
1 Game Overlay.
Relays x (1 per player slot)
Triggers x (Amount of player slots + amount of relays + 1) (Maybe more)
Damager x1
Buttons (Amount of player slots)

Suspnded_Arr0w_Shaft: Hey, this is a lot of stuff. I’m surprised my buddy Tiñaana remembered all this.


TinanYx: Hmph.

Step 1: The Buttons

Place the amount of buttons for the amount of player slots you want. Get that same amount of triggers. In the buttons, make sure they can only be pressed once, you can do this by, in channels, having them (when pressed) transmit on a channel, and then deactivate on that channel.
Wire each button to a trigger. In the trigger, do this code.

Set property : [Player #]
Value: [The player slot number you are creating]

Step 2: The Coordinate Device

Place a player coordinate device. Have it update a property when the player’s coordinates change. Have it change property MyX for the X coordinate, and MyY for the Y coordinate.

Step 3: The Coordinate Updater

Get a lifecycle, relay, and trigger.
Wire the lifecycle and relay like so:

When event occurs [>] Relay

Now, in the repeater, set it to stop repeating on channel (do not give channel and have it do task every 0.5 seconds. Now, wire that a trigger like so:

When task occurs [>] Trigger.

In the trigger, add this code:
[Please wait until I add a picture, sorry for the wait]

Step 4: Setting Up The Properties

Get 2 properties. Name one MyX and one MyY. Set both of these to number type and scope to player.
Get another property, and name it Player #. Set the scope to player and make it a number type property.
Now, get two properties per each player slot.
Name each property using this format

Player# [Player Number] [X or Y, you need both for one player slot]

Now we have our properties!

Suspnded_Arr0w_Shaft: No, really, Tiñaana, I thought we had our bagels.


TinanYx: JUST SHUT UP AND EDIT. I AM THE BRAINS OF THIS OPERATION.

Step 5: Overlay

Place an overlay. Set it to button type, and name it punch. [More words you can use are at the end]
Get a trigger. Make it invisible and not triggerable by stepping on it.
Do this code in it:

Broadcast Message On Channel: Create Text With: 
 | text [DN]
 | get property: Player#                                                     
Step 6: The Actual Checking and Damaging Code.

Place relays. (One for each player slot)
Place triggers. (Again, the amount of player slots)
Now, have each relay relay on DN1 [Change the # by 1 for each relay).
Wire each relay to a trigger. Do this code inside each one:

Step 7: The Damager

Place a Damager. Make it damage by your choice of damage on channel ‘damage’.

Suspnded_Arr0w_Shaft: Wow, Tiñaana, how did you ever think of that genius channel name?


TinanYx: I AM SMART, OKAY?

Thank you for reading! I hope this is helpful! :D

Suspnded_Arr0w_Shaft: Yes, hopefully this helps you, unlike most of the things Tiñaana posts


TinanYx: STOP CALLING ME THAT!


Stuff I will add later:

Knockout checker- Checks who knocked you out so the knock-outer gets their score updated. This is what the ‘Latest Puncher’ thing is.

Range-Add ranges so you can punch from a longer distance
away.

Overlay Cooldown- To stop people from spamming the overlay button.

Other Words Instead of ‘Punch’

Slap
Hit
M1
Eat Penguin
Will add more!

  • :penguin:
  • 5/5 Quality
  • 4/5 Quality
  • 3/5 Quality
  • 2/5 Quality
  • 1/5 Quality
0 voters
Credits

Suspnded_Arr0w_Shaft (Alter Ego)
Toothless (Improving Block Code)
Boss_1s (Suggestions to make guide better)
SeamlessMoon (Improving Block Code)
No_Longer_A_Noob (Suggestions)

Feel free to comment with any questions, concerns, or suggestions. I will reply as soon as I can.

Suspnded_Arr0w_Shaft: And, according to tradition, :heart: if you eat :penguin:’s, because Tiñaana is too busy watching Dinos’ fight each other to say it himself.


TinanYx: I’m ‘boutta CRASH OU-


Crashing noises, screams, and the occasional explos1on follow

18 Likes

I will add more pictures and some humor later, if you were wondering.

3 Likes

Could you add an overall picture - to show the final product as the devices and as the gameplay pls? Idk why but it helps me.

2 Likes

I will make a GIF, thanks for the advice.

Uhmm why not use tag zones?

Because tag zones take a lot of memory.

Coordinates take up more tho.

But you would have to have a lot of tag zones.

But innit this just this

With a damager?

No, this is different. I use a different method.

Is this not finished? What is the Latest puncher?

It explains in the guide. Read it, and maybe you’ll find it.
Edit: sorry, forgot that part. I’ll add it now.

You may have forgotten to add the section about where to use the coords tracker and find the enemy coords.

1 Like

Okay, I added all the stuff I forgot, except for one pic I will get in a bit. Thank you for pointing this stuff out to me. :D

Great guide except the code, specifically here

You know that little gear symbol click on it and drag another “If” statement to save code

No biggie :slightly_smiling_face:

2 Likes

Oops, yeah, thanks for pointing that out. I’ll add it in later.

1 Like

Not just that they can use concatenation, basically your DN1, DN2, and DN3 share DN in it. So you could just check if the number is below 3 (in case the number goes above) then have the code like this:

Broadcast Message On Channel: Create text-
                        item 1: DN
                        item 2: convert numbers to text Get Property "Player #"
3 Likes

I changed it to this in the guide. Thanks!

wait, this can be the solution for my game, so i am making a combat(add this word from the other words instead of punch) game, does it work on sentries @TinanYx

1 Like

No it doesn’t player only cuz Player Coord.