Which file and where do find how high Mario jumps? And is there a way I can make it that the default jump height is lower than usual, but jumps the current height if he's walking on repulsion gel?
Thanks.
Mario jump height?
- TripleXero
- Posts: 892
- Joined: 08 Aug 2012, 00:23
- Contact:
variables.lua has gravity and speeds and points for killing enemies and all of that stuff in it. I don't know about the other question, but one of Turtle95's new Gels contains one that makes you jump lower, you could probably edit it for what you're trying to do
It's gel number 7.TripleXero wrote:variables.lua has gravity and speeds and points for killing enemies and all of that stuff in it. I don't know about the other question, but one of Turtle95's new Gels contains one that makes you jump lower, you could probably edit it for what you're trying to do
Code: Select all
if self.jumping == true then
--bottom on grid
if math.mod(self.y+self.height, 1) == 0 then
local x = round(self.x+self.width/2+.5)
local y = self.y+self.height+1
--x and y in map
if inmap(x, y) then
--top of block orange
if map[x][y]["gels"]["top"] == 7 then
local force = -jumpforce - (math.abs(self.speedx) / maxrunspeed)*jumpforceadd
force = math.max(-jumpforce - jumpforceadd, force)
self.speedy = force / 2
playsound(stickypaint)
end
end
end
end
Code: Select all
function mario:jump()
if not noupdate and self.controlsenabled then
if not underwater then
if self.spring then
self.springhigh = true
return
end
if self.falling == false then
if self.size == 1 then
playsound(jumpsound)
else
playsound(jumpbigsound)
end
local force = -jumpforce - (math.abs(self.speedx) / maxrunspeed)*jumpforceadd
force = math.max(-jumpforce - jumpforceadd, force)
self.speedy = force
self.jumping = true
self.animationstate = "jumping"
self:setquad()
end
else
if self.ducking then
self:duck(false)
end
playsound(swimsound)
self.speedy = -uwjumpforce - (math.abs(self.speedx) / maxrunspeed)*uwjumpforceadd
self.jumping = true
self.animationstate = "jumping"
self:setquad()
end
end
end
- BobTheLawyer
- Posts: 2232
- Joined: 01 May 2012, 21:00
For the first question, variables.lua line 38.cavejohnson99 wrote:Which file and where do find how high Mario jumps? And is there a way I can make it that the default jump height is lower than usual, but jumps the current height if he's walking on repulsion gel?
Thanks.
The other question, use Turtle's code.