T
tonilatenz
Guest
Hej everyone. As the title already states, i would like to assign several instances of an object to different paths i set.
Lets say i have an "enemy" object which has a specific behaviour:
It follows a defined patrol path. If the player comes near the enemy, the enemy starts chasing the player (via grid based path finding).
If the player can flee and get out of sight, the enemy will return to its patrol path.
That works very well for 1 enemy. However, of course i want to have multiple of these enemies in one room. I only want each of them assigned to "his own" patrol path.
So i tried to do this via creation code for each instance, that didn't work.
What am i missing here?
By the way, i am using the room editor to place my enemies and don't use instance_create...the enemies are there at start.
So how can i let's say alter the value of the enemies variable "patrol_path" for each instance? Got a lot of weird stuff happening when trying with more than 1 instance.
Any help is much appreciated.
Lets say i have an "enemy" object which has a specific behaviour:
It follows a defined patrol path. If the player comes near the enemy, the enemy starts chasing the player (via grid based path finding).
If the player can flee and get out of sight, the enemy will return to its patrol path.
That works very well for 1 enemy. However, of course i want to have multiple of these enemies in one room. I only want each of them assigned to "his own" patrol path.
So i tried to do this via creation code for each instance, that didn't work.
What am i missing here?
By the way, i am using the room editor to place my enemies and don't use instance_create...the enemies are there at start.
So how can i let's say alter the value of the enemies variable "patrol_path" for each instance? Got a lot of weird stuff happening when trying with more than 1 instance.
Any help is much appreciated.