MCSmash/Super Smash Craft Beta (Bug fixes! Per-arena item management!)
#1
That one plugin probably only one or two of you have been waiting for. I bring you Super Smash Bros. in Minecraft. It follows the basic mechanics of the original games but in a 3D plane.

-- How to use: --

Well, first you need a place to brawl, right?

But before that, stand on the spot where you want players to respawn after being eliminated, then do:

/setlobby

This is pretty self-explanatory.

NOW you can build an arena.

Create a new world with a fighting field preferably atleast 20x20 and 40 blocks above the ground. Place a 3x3 wide section of note blocks 2 blocks under the spawn point (Needed for music to work correctly). Stand in the center where you would like the players to respawn. (I recommend WorldEdit to make the arena using /up 0 to build a platform off of.) Now type:

/createarena <Name of the stadium> <Inner boundary radius where players respawn (preferably the entirety of the solid ground)> <Outer radius (How far they fly before being knocked out)>

Now type: /listarenas

Your newly made stadium should be listed there.
Multiple arenas can be in a single world.

To enter that newly made stadium and start fighting, do /joinsmash <Name of arena>

Controls:

* Right-click with the given Diamond Sword to Double-Jump in the air/Triple-Jump off the ground
* That's about it, beat the dust out of anyone you see in sight. Big Grin
* Also, there are item drops. Currently, there are golden apples (Invincibility Stars) and the Diamond Axe (The Dreaded Hammer. Big Grin)

There are several known bugs that I have yet to fix, all of them relatively minor. This plugin in my opinion is ready for testing.

I would VERY much appreciate it if someone could host a server with it so we can try out some mass multiplayer with this. Big Grin Screenshots may be coming soon.

EDIT: PLEASE do not use this version as it is severely outdated. Use the second version of the plugin found here.
https://forum.cuberite.org/showthread.php?tid=1839


Attached Files
.zip   MCSmashv0.4.zip (Size: 8.38 KB / Downloads: 328)
Reply
Thanks given by:
#2
Cool, another minigameBig Grin

I manged to create an actual double jump some time ago. If I remember correctly the code looked something like this:
-- This goes somewhere where the player would join the arena
Player:SetCanFly(true)



-- The OnPlayerMoving hook
function OnPlayerMoving(a_Player, a_OldPosition, a_NewPosition)
	-- I don\'t know how your plugin checks if the player has joined an arena, so I\'ll do this for now.
	if (not IsInArena(a_Player)) then
		return false
	end
	
	-- Check if the player is flying
	if (not a_Player:IsFlying()) then
		return false
	end
	
	a_Player:SetFlying(false)
	a_Player:SetSpeedY(10) -- Set a proper jump height here
end
Reply
Thanks given by:
#3
Oh wow, nice. Smile Mind if I eventually replace the right-click with the space double-jump? I could use the sword block for the shield.

And to anyone who wants to modify it or anything, PLEASE do it, its kind of sloppily written.
Reply
Thanks given by:
#4
Of course Smile

Keep in mind that it relies on players starting to fly, so you might have to press space 3 times in total.
Reply
Thanks given by:
#5
Oh ok, I'll take that into consideration. Smile

Also, a glitch I can't seem to fix involves Players not teleporting when Player:SetPosition() is used. Replacing it with Player:TeleportToCoords() works, but instant teleportation would be very much useful.
Reply
Thanks given by:
#6
TeleportToCoords should be the function you're looking for.. I don't even know why SetPosition is exported to the Lua API anyway. Maybe @xoft can shed some light?
Reply
Thanks given by:
#7
The thing about TeleportToCoords is that it takes some ticks to actually get to the destination it seems because its like throwing an enderpearl, you just accelerate really fast in that direction. So while its teleporting, it checks every tick if the player is out of bounds. If the player is still out there on the second tick, he loses more than one life before respawning. So something like direct position control would be nice. Confused
Reply
Thanks given by:
#8
Actualy the TeleportToCoords function uses the cEntity:SetPosition function, but it also broadcasts it to every player: https://github.com/mc-server/MCServer/bl...1633-L1637
Reply
Thanks given by:
#9
Oh ok, so thats just kind of my fault. I probably should find a way around that. I just checked if the player was invincible, and if he was, no lives would be taken away. So right after the first contact with the outer boundary, I would set the players invincible ticks to 5. Unfortunately, the invincibility powerup kind of interferes with that so the guy who's invincible can't lose any lives whether he fell off or not.
Reply
Thanks given by:
#10
Good, but...
Does this plugin add a knockback depending on player damage?
I mean, in Smash Bros is your damage is 300% a hit and you "fly"
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)