The Daily Click ::. Forums ::. Klik Coding Help ::. Spreading values
 

Post Reply  Post Oekaki 
 

Posted By Message

Airflow

imafirinmahlazr

Registered
  24/09/2003
Points
  -197

VIP MemberSonic SpeedSnow Cloud!Computer
18th October, 2016 at 18/10/2016 09:11:36 -

I'm using MMF2 build 257.12, I have 2 active objects. a circle and bird. circle are bouncy objects with speed 10, both spread value d, and birds set {x,y} position to circles like this.

every 10 seconds: set circle direction random(32)
always: circle <- spread value d
always: bird <- spread value d
always: bird <- set bird x to x("circle")
always: bird <- set bird y to y("circle")

For some reason, when I run this code, each circle has one bird attached to it! What is going on?!

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49614

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 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
18th October, 2016 at 18/10/2016 16:28:09 -

Based on what you've stated that's exactly what should happen.

Fusion automatically distributes instances of one object to another object whenever you use set position to link them together. This makes it easier to make heath-bars, or clothing follow a character for example.

What are you trying to accomplish. I might be able to point you in the right direction.

Edit: Also (unless you left something out) spreading the values had nothing to do with the outcome. You should be able to remove that code and it'll still act the same.

Edited by UrbanMonk

 
n/a

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
19th October, 2016 at 19/10/2016 02:07:05 -

Agreed. I've done a lot using spreadvalues, could help out if we knew what you were trying to accomplish

 
[Game design makes my brain feel like its gonna explode.]

Airflow

imafirinmahlazr

Registered
  24/09/2003
Points
  -197

VIP MemberSonic SpeedSnow Cloud!Computer
20th October, 2016 at 20/10/2016 05:24:58 -

thanks urbanmonk, do you know how long fusion has done this?

@siven, i've already accomplished what i wanted, the problem is how did i do it

 
n/a
   

Post Reply



 



Advertisement

Worth A Click