Skip to content

Instantly share code, notes, and snippets.

@Pwootage
Created July 28, 2011 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pwootage/1110916 to your computer and use it in GitHub Desktop.
Save Pwootage/1110916 to your computer and use it in GitHub Desktop.
function fakeFan(xmin, xmax, zmin, zmax, ypos)
{
var ppos = player.getPosition();
if (ppos.x > xmin && ppos.x < xmax+1) {
if (ppos.z > zmin && ppos.z < xmax+1) {
if (ppos.y > ypos) {
dist = (ppos.y - ypos) + 0.4;
var pvel = player.getVelocity();
if (dist < 4) {
player.setVelocity(pvel.x, pvel.y + ((0.07 * ((4-dist)))-0.04), pvel.z);
//chat.print(dist);
}
}}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment