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: This system takes quite a bit of memory
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!
- 5/5 Quality
- 4/5 Quality
- 3/5 Quality
- 2/5 Quality
- 1/5 Quality
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,
if you eat
’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