I'm trying to implement a carry weight system via events and basic scripting, which seems to almost work - aside from a game breaking error. Basically I run an event every 60 frames that checks if a variable is above or below a certain value, stopping all movement if true and allowing movement if false.
This is supposed to stop movement:
And this is supposed to allow movement:
But I'm getting this error presumably whenever it runs, as it hits immediately lol
any way to make this work?
This is supposed to stop movement:
Code:
if($gamePlayer.moveByInputCached === undefined)
$gamePlayer.moveByInputCached = $gamePlayer.moveByInput;
$gamePlayer.moveByInput = function(){
return false;
}
Code:
$gamePlayer.moveByInput = $gamePlayer.moveByInputCached;
But I'm getting this error presumably whenever it runs, as it hits immediately lol
any way to make this work?