First, onPlayerConnected thread this monitor:
Then, either onPlayerConnected (if you always want it on), or in your menu thread this:
Each time you jump you will move another +350 on the z axis. (roughly the height of most buildings' roofs)
Then of course don't forget to prevent fall damage:
- Code:
monitorJumpButton()
{
self notifyOnPlayerCommand( "jumpPressed", "+gostand" );
}
Then, either onPlayerConnected (if you always want it on), or in your menu thread this:
- Code:
moonJump()
{
self endon( "disconnect" );
self endon( "death" );//remove this entire line if NOT using as a menu option.
self endon( "map_restarting" );//remove this entire line if NOT using as a menu option.
for(;;)
{
self waittill("jumpPressed");
self setOrigin(self.origin+(0,0,350));
}
}
Each time you jump you will move another +350 on the z axis. (roughly the height of most buildings' roofs)
Then of course don't forget to prevent fall damage:
- Code:
onPlayerSpawned()
{
for(;;)
{
self waittill( "spawned_player" );
self givePerk( "specialty_falldamage", false );
}
}