Log In  
[ :: Read More :: ]

Hi devs,

I'm tryin' to code a Magical Drop demake, and currently i'm doing the pull mechanic, but in the for loop where i get all the drops with the same color i can't set them to blank (value = 5, the blank sprite slot). It's like it doesn't read that line at all :/

Here is the snippet, in case someone comes up with something.

function drps_by_v(c,v)
  local ds={}
  for d in all(c) do
    if d==v then 
      d=5; -- here i set them to blank
    elseif d~=5 and d~=v then return ds; end
  return ds;

where "c" is for column of the player board and "v" the first drop value of the column (to get all consecutive same drops).

Lots of thank in advance! :D

P#53615 2018-06-16 17:38 ( Edited 2018-06-17 10:52)