dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Last Position

  1. #1
    Senior Member
    Join Date
    Sep 2002
    Posts
    138

    Last Position

    Hi, can someone please help? I am working on a turn-based space game and I need to save the ship's last position for use in hittests (meaning: the ship has a number of movement points. it goes up one, if it hits a planet it returns to its last position). I searched the forum under 'last position' and nothing came up.

    I appreciate any help.

  2. #2
    Innovation = Cool Tyg's Avatar
    Join Date
    Feb 2003
    Posts
    339
    why not just save the position in a temporary variable when it is hit
    then restore it or make a reset function

    if (hit){
    oldx = _this._x
    oldy = _this._y
    }

    function reset() {
    _x=oldx;
    _y=oldy;
    }

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center