Results 1 to 2 of 2
  1. #1

    Slippery tiles??

    well im making a game and i want my character to run on some icey tiles and when he stops he will slide a bit, ive tried saying basically if(character is standing on a slippery tile){
    if (speed >= 5){
    speed = 5;
    character.x += speed*dirx; //speed = 5
    speed -= 0.5;
    }
    if (speed <= -5){
    speed = 5;
    character.x += speed*dirx; //speed = -5
    speed += 0.5;
    } else (speed == 0){
    speed = 0;
    char.gotoAndStop("idle");
    }
    }

    but it doesnt work at all, i know its close, but way off at the same time, so could someone answer this question for me?

  2. #2

Similar Threads

  1. sliding tiles puzzle
    By vbrown in forum Game/AI Programming
    Replies: 8
    Last Post: October 26th, 2005, 05:18 AM
  2. Fence tiles needed
    By GreenLantern in forum User Interface / Design Discussion
    Replies: 12
    Last Post: January 21st, 2005, 03:16 PM
  3. tiles
    By yhack in forum Flash IDE
    Replies: 0
    Last Post: July 5th, 2004, 05:03 PM
  4. instantly changing tiles (walkable to non-walkable)
    By meatbag in forum Game/AI Programming
    Replies: 2
    Last Post: May 25th, 2004, 08:15 AM
  5. Tiles?
    By yhack in forum Game/AI Programming
    Replies: 2
    Last Post: May 10th, 2004, 06:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012