Open mari0portalplayer opened 11 months ago
Like that,if doesn't exists
self.leftkeypress = true
else
self.leftkeypress = false
end
if upkey(self.playernumber) and self.controlsenabled then
self.upkeypress = true
else
self.upkeypress = false
end
if downkey(self.playernumber) and self.controlsenabled then
self.downkeypress = true
else
self.downkeypress = false
end
if rightkey(self.playernumber) and self.controlsenabled then
self.rightkeypress = true
else
self.rightkeypress = false
end
if usekey(self.playernumber) and self.controlsenabled then
self.usekeypress = true
else
self.usekeypress = false
end
if jumpkey(self.playernumber) and self.controlsenabled then
self.jumpkeypress = true
else
self.jumpkeypress = false
end
if runkey(self.playernumber) and self.controlsenabled then
self.runkeypress = true
else
self.runkeypress = false
end
if reloadkey(self.playernumber) and self.controlsenabled then
self.reloadkeypress = true
else
self.reloadkeypress = false
end
ahaha, no. There are so many other ways to read a players input like idk... the animation system? It literally has triggers for pressing, holding and undressing keys.
You can already do this if you make a button controller, instead of suggesting a feature be added that like 3 people can use correctly
It would be cool if something like "self.leftkeypress = true" be added to mario.lua