[Behavior] Runaway Sprite

Post your completed addons to share with the community

Post » Tue Jun 12, 2012 7:09 pm

@delgado

I have a idea on how to do this. It would not be automatic, it will require some external events.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Wed Jun 13, 2012 2:39 pm

the second link not work
B
60
S
9
G
7
Posts: 176
Reputation: 8,799

Post » Wed Jun 13, 2012 3:38 pm

@felixsg

I was optimizing the code. The url should be good now.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Wed Jun 13, 2012 11:19 pm

I added AI to the behavior. You can set a destination point and the object will move randomly towards it. I also made a demo(demo2 in first post) which shows a black box moving to colored squares labeled with numbers. The black square moves from 1 to 2 to 3 to 4 in that order. let me know if there is any bugs.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Wed Jun 13, 2012 11:51 pm

Can you add something like that: when sprite move, wait x seconds before move again?
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Thu Jun 14, 2012 12:39 am

@delgado

runawaydelay was supposed to do this, but i left out the code for some reason. I just put it back in.

It stops the movement for the amount of seconds you set runawaydelay to after it either hits a solid object or reaches max distance.rfisher2012-06-14 00:47:45
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Thu Jun 14, 2012 7:08 am

i trying change statistics runawatdealy (0.1-100) and my sprite move always smoothly without rest
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Thu Jun 14, 2012 11:57 am

@delgado

download the behavior again, it should work after you do that.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Sat Jun 16, 2012 1:07 am

That's pretty cool plugin!

I tried it and i found something weird, when you set Runaway Behavior 8 way to Down, then it results right, up, left, 3 kinds of diagonal. I think it could be a bug...

Anyways, there a way to remove diagonal?
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Sat Jun 16, 2012 12:22 pm

@Joannesalfa

I have a update which might fix the problem since i could not duplicate your problem. Download the plugin again and try it again.

As for removing diagonals from the behavior directions of up, down, right, left. I was trying to make the movement random and sporadic. I will add more behavior directions that will include what you want.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests