MoveTo, Wait, MoveTo, Wait, Repeat

Get help using Construct 2

Post » Mon Apr 15, 2013 4:00 pm

@ADenton - I think your first step before working out any event logic should be to clearly define states & behaviours for your guard, & think through every possibile situation for him.

I would have the states (stored in the guard as a combination of bools or a single text variable) for a guard in a shooter game something like this:

Patrol - walks between waypoints, relaxed posture; initial behaviour

Patrol alert - walks between waypoints, combat pose; this behaviour triggered after being previously alerted, & could return to the initial patrol after a time.

Suspicious - hears noise & stops patrolling; walks towards point of last noise; waits there for several seconds; if nothing found, walks to closest waypoint & state changes to 'patrol alert'

Attack - has player line-of-sight, or saw player within eg. the last 10secs; runs at player & shoots; if player shoots back then run to nearest cover


@Alisa - yes I'm using MoveTo at the moment for some elevators, very handy behaviour
B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Mon Apr 22, 2013 6:00 am

@Alisa

Try Zigzag behavior, it could define a square path very easily. (Even a hex path)
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri May 03, 2013 7:13 pm

Thanks Rexrainbow! I'll give that a look!
B
11
S
3
G
1
Posts: 23
Reputation: 1,615

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests