[SOLVED]Zombie AI

For questions about using Classic.

Post » Fri Jul 29, 2011 9:53 pm

I am stuck on creating a zombie AI, I used the RTS behavior and the LOS behavior,

Here is my current events,
+ System: Always (every tick)
+ Sprite4: On LOS to Player
-> Sprite4: Move to Player

+ Sprite4: [negated] On LOS to Player
+ System: Every 5000 milliseconds
-> Sprite4: Set angle to random(360)

I need to make the zombie follow the player if it can "see" the player and then attack it(decrease health).mogey2011-07-31 01:09:28
B
4
S
1
G
1
Posts: 50
Reputation: 802

Post » Fri Jul 29, 2011 10:19 pm

Try has los instead of on, and get rid of the always. You can then do else instead of the negated.
Image Image
B
164
S
49
G
113
Posts: 7,648
Reputation: 78,995

Post » Sat Jul 30, 2011 12:15 am

Now it just spins around in a circle forever.
B
4
S
1
G
1
Posts: 50
Reputation: 802

Post » Sat Jul 30, 2011 1:11 am

Sounds like its not getting triggered somehow.
Here's an example.
Image Image
B
164
S
49
G
113
Posts: 7,648
Reputation: 78,995

Post » Sat Jul 30, 2011 7:27 pm

Thanks for the example, I tried implenting it into mine and it works, but the zombie will not face the direction he is moving in and also before I forget and open another topic, what expression could I use to allow the user to change the resolution.
B
4
S
1
G
1
Posts: 50
Reputation: 802

Post » Sat Jul 30, 2011 11:06 pm

Seems to work fine in the example I posted. You might try the rts behavior for movement instead. It will handle the angles, and movement for you.
As to changing rez, there is no specific function built in. You can zoom, and scale.
Might search the forum I think there's a recent thread floating around.
Image Image
B
164
S
49
G
113
Posts: 7,648
Reputation: 78,995

Post » Sun Jul 31, 2011 1:09 am

Thanks alot for the help.
B
4
S
1
G
1
Posts: 50
Reputation: 802


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests