The Daily Click ::. Forums ::. Klik Coding Help ::. Possible Bug with Drag+Drop movement?
 

Post Reply  Post Oekaki 
 

Posted By Message

Rick Cameron



Registered
  11/03/2012 08:45:25
Points
  82
18th May, 2015 at 18/05/2015 04:25:35 -

Hey team, long time no post ridiculous question.

I'm working on a tabletop battle game in MMF. For the deployment of your units, you need to be able to drag and drop the unit markers onto the board obviously, but I'm running into a strange thing where P1 Unit 10 and P2 Unit 10 are not able to be moved.

The deets;

Each player has 10 active objects that represent any given unit, labelled P1 Unit 1 - P1 Unit 10, and P2 Unit 1 - P2 Unit 10.
P1 units belong to group.friends and P2 group.enemies.
Each unit has two movements, Click and Drag (#1) and Static (#2)

With movement #1 being selected on all the objects, the level should start with C+D movement by default, and it does for all Units that aren't P1 Unit 10 or P2 Unit 10, which refuse to cooperate.

I've also popped a command into a "Start of Frame" event to set all group.friends and group.enemies movement to #1, which again works for all but the Units 10.

Thirdly, the movement switch is also tied a Flag, so toggling the flag sets movement type to 1 or 2 depending on it's status. Again, works for everything but Units 10.

I've checked everything I can think of. The units are definitely under the qualifier, the movements are exactly as described above, and I'm stumped as to why this isn't working.

Any help would be appreciated. There's probably some forgotten dusty corner in the events list somewhere that I've missed, and I'll keep trawling through it, but I thought I'd post and see if anyone has ever had the same issues.

Cheers guys!

 
n/a

Rick Cameron



Registered
  11/03/2012 08:45:25
Points
  82
19th May, 2015 at 19/05/2015 23:41:09 -

Fixed.

If Mouse is over Group.Friend
and
Repeat while mouse 1 is clicked

-> Set X of Group.Friend to Xmouse,
-> Set Y of Group.Friend to Ymouse

So mind explodingly simple. Can't believe how long I battled this for.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click