[Behavior] Runaway Sprite

Post your completed addons to share with the community

Post » Mon Jun 11, 2012 7:08 pm

Updated - December 31st 2012 Ver 1.02

I added collision registration to the behavior and made changes according to the new behavior template.


All have is a working demo of the behavior.

Demo

Demo 2 shows the object following a path defined by 4 points.

Demo 2 CAPX

The behavior is called runaway and all it does is randomly move a sprite around the screen, bouncing off solid objects.

You can set max distance it travels before it randomly changes the direction. Delay when direction is changed. The speed of the sprite in pixels.

I'm still testing and if there is interest in the behavior i work on it more to release it to the public.

This demo is made up of only 2 events and 1 of them is to show the FPS.

Runaway Behavior

Knights follow path on a map DEMOrfisher2012-12-31 20:59:02
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Mon Jun 11, 2012 7:59 pm

Wow, that does look good! Could it be used as a sort of NPC movement control in a Pokemon game sort of style? Looks like it could. Would have some great uses! Great work!
B
29
S
4
Posts: 42
Reputation: 2,391

Post » Mon Jun 11, 2012 8:34 pm

Doesn't seem to work here - Chrome's console reports 'temp' is not defined.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Mon Jun 11, 2012 9:31 pm

Works here in both firefox & chrome. Nice behavior 8)
B
50
S
11
G
7
Posts: 274
Reputation: 8,146

Post » Mon Jun 11, 2012 9:37 pm

@ashley

It was my maze plugin that was causing the trouble, its fixed now. sorry about that.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Mon Jun 11, 2012 9:39 pm

Ah, works now. Cool, looks like a useful plugin for enemy AI!
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Tue Jun 12, 2012 8:20 am

Nice, that makes easy to some enemies on 8 dir! When are you going yo release this plugin?
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Tue Jun 12, 2012 2:32 pm

I just released the behavior, let me know if you have any problems.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Tue Jun 12, 2012 6:24 pm

Added the ability to pick how you want the behavior to work.

8-way
4-way
up
down
left
right

Up, Down , Left and Right all move in those directions, but also at 45 degree angles from the direction.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Tue Jun 12, 2012 6:35 pm

Great behavior! Maybe think about something like that to add: when player is too close (200px) enemy auto runaway/ away from player/ towards player?delgado2012-06-12 18:35:47
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests