The Daily Click ::. Forums ::. Klik Coding Help ::. moving array data
 

Post Reply  Post Oekaki 
 

Posted By Message

bno



Registered
  13/02/2016 15:54:00
Points
  2
6th May, 2017 at 06/05/2017 03:28:16 -

how to move array data, for example
if pressed up key - move all data within to current ypos -1
if pressed down key - move all data within to current ypos + 1
if pressed left key - move all data within to current xpos - 1
if pressed right key - move all data within to current xpos +1

like moveving object by pixel.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  57004

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 33 Winner!Picture Me This Round 32 Winner!Santa!Box Blue
6th May, 2017 at 06/05/2017 15:13:14 -

There isn't an easy way to do this with the built in array object.

You could run a loop that iterates through the array and shifts everything.
Or you could have some sort of read index offset that you shift instead and add the offset to your array processing.

 
http://www.soapcow.com <- Flash games, featuring MMF made games!
http://www.jsoftgames.com <- Old blog I don't keep up anymore
http://www.rodentrush.com <- My best iphone game, made with Fusion.
   

Post Reply



 



Advertisement

Worth A Click