i have a crow character that i want to be flying in a specified area, but when the character gets within a certain distance/ line of sight, the crow seeks the player and swoops down. exactly like the enemy in this video at 16 seconds
here is my capx file
please can someone try to make this work id greatly appreciate it and maybe even toss you a tip with paypal lol
https://www.dropbox.com/s/x5mhrrj31zyjg ... .capx?dl=0
You can take advantage of a "state" variable on your crow object. Use different events to control the behavior according to the state.
For example, add an instance boolean variable "attacking", default false.
For your events:
1. if "attacking" is false -> fly in specified area.
2. Trigger once, compare two values distance(player.x, player.y, crow.x, crow.y) < specified distance -> set "attacking" to true.
3. If "attacking" is true -> attack player
im still new to c2 so thats a little confusing sadly....
please if someone could make this work in my capx file and put comments explaining why it works so i can learn it id truly appreciate it.....spent last 2 hour trying things and cant get to work.
Develop games in your browser. Powerful, performant & highly capable.
I don't have any plugins so I cannot open your project. Here is a quick concept example - https://www.dropbox.com/s/uzdqmvi7bpq43 ... .capx?dl=0