State Machine, why not?

Get help using Construct 2

Post » Tue May 27, 2014 7:02 pm

Hi,
trying to set up an FSM, not a proper coder myself, but shouldn't this work? I'm getting somewhat unpredictable results, like entities not moving or not stopping, some times firing, sometimes not.
You do not have the required permissions to view the files attached to this post.
B
12
S
5
Posts: 207
Reputation: 1,672

Post » Tue May 27, 2014 7:53 pm

If i remember correctly triggers fire off independently of conditions they are placed in so they should be on the outside of the condition. Try putting the "On" triggers on the out side of the condition and the if(idle,approach) inside them.
B
20
S
7
G
1
Posts: 221
Reputation: 2,077

Post » Tue May 27, 2014 7:54 pm

Unless an instance is picked distance() will only use the first index of the object given.
To cycle over each instance you can use for each. It is cpu intensive, so use sparingly.
You could possibly use the los behavior instead.
Image ImageImage
B
168
S
50
G
163
Posts: 8,226
Reputation: 105,071


Return to How do I....?

Who is online

Users browsing this forum: MoscowModder, Sup with that? and 11 guests