I’m making a simulator like the arm wrestling simulator that’s is in fortnite right now. The person who made it was able to let the player win the arm wrestling match by spamming the jump button. If you don’t spam the jump button, the enemy will win. How do I make something similar?
You might want to use .JumpedEvent()
to detect if player jumped or not and from there you call a function. Here is an example of how to use it:
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
# A Verse-authored creative device that can be placed in a level
JumpDetector := class(creative_device):
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
AllPlayers:= GetPlayspace().GetPlayers()
for (Player: AllPlayers, FortChar:= Player.GetFortCharacter[]): # Get 'fort_character' from 'Player'
FortChar.JumpedEvent().Subscribe(OnPlayerJump) # Assign the event to player
# Function to call when player jumps
OnPlayerJump(FortChar: fort_character): void=
Print("Player jumped!") # This will be printed when player jumps
# Your code here...
I have no clue where to plug-in anything. Do you think you could do it in my map please? I could give you a quick $50 if you can do it! What’s your discord?
Ahh so you’re not familiar with verse. The code I wrote above is an example of how to detect player when jumping. There is nothing practical about it. If you are looking for fully functional code you might want to look for verse developer to do it on Twitter maybe. I’m glad to help you but I’m afraid I’m currently not available
No, I’m not really familiar with verse but I will try it on my own later today. Thank you
1 Like