Posted By
|
Message
|
vinicio
Registered 11/04/2015 21:20:09
Points 142
|
14th May, 2016 at 14/05/2016 17:18:37 -
so i've been trying to do an enemy AI that jumps n shoots.
it works fine but the problem is that i want mutiple of this type of enemy,
it workswhe it is only one but if there are multiple of them they dont work properly and stop working after a while and i've tried some stuff but it hasn't worked.
any one know how to do this? i would gladly aprecite it.
Here is the file if anyone wants to know.
https://mega.nz/#!PIQQBBSa!tpiESpQB5d9Ryg_giTAZ2JvfbC261O80FUbHd0iWOVE
Edited by vinicio
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
15th May, 2016 at 15/05/2016 20:50:02 -
You need to use a loop in order to handle each of the object's individually.
Just have an always condition, and then do the action "For each of object "enemy""
Next you need to add the condition "on loop "enemy"" to all the existing AI conditions.
Edited by UrbanMonk
n/a
|
vinicio
Registered 11/04/2015 21:20:09
Points 142
|
16th May, 2016 at 16/05/2016 00:07:22 -
thanks, but how do it get to work with these do i have to start the loop just one time after a condition?
i've never used them so i dont have a clear idea of their usage
sorry for being annoying
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
16th May, 2016 at 16/05/2016 16:23:03 -
You aren't being annoying. That's what these forums are for!
So I just downloaded your MFA and tried it. I placed an extra flame solder to see if I could replicate the problem you mentioned, but everything seemed to work just fine?
Are you running the latest version of Fusion?
Go here to download the latest beta then try your running your game again:
http://community.clickteam.com/threads/84521-Download-links
If there is still an issue can you describe to me exactly what it's doing and then what you expect it to do?
n/a
|
vinicio
Registered 11/04/2015 21:20:09
Points 142
|
16th May, 2016 at 16/05/2016 23:00:30 -
so the problem maybe it has to do with the time.
after certain amount of time (it could be really long or really short)
they just stop attacking and the stay in their place,
they just get locked out by maybe a variable or all perform the same event,
but i cant really tell any about that because i dont know.
also i cant acces to the link i dont know why because i do have an account there.
EDIT:
okay, so i found something new while testing the fast loops stuff, i´ve realized that the problem starts happening after there being more than three of the same type of enemy, when there are 3 or more of those, the mentioned above starts happening with or without loops regardless.
Edited by vinicio
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
17th May, 2016 at 17/05/2016 18:15:39 -
Make an account on the clickteam forums then register your product key to access that forum.
Sounds like some sort of state issue. Maybe the enemies are getting stuck in an odd state.
You can use the string object to display the enemies variables as floating text above them, that might help with the debugging.
Or you can use the debugger built-in to fusion, but it can be a pain to use sometimes.
n/a
|
vinicio
Registered 11/04/2015 21:20:09
Points 142
|
18th May, 2016 at 18/05/2016 03:30:54 -
i did the debugging and it helped a lot thanks!
they still need some work but now its much better after seeing how they get locked out, now i can actually fix it.
thanks a lot i really really apreciate the help one can recieve here.
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
23rd May, 2016 at 23/05/2016 15:46:00 -
Glad I could help!
What was the problem exactly? Did you figure it out?
n/a
|
vinicio
Registered 11/04/2015 21:20:09
Points 142
|
25th May, 2016 at 25/05/2016 04:02:04 -
sorry for the long post.
the problem was the time that an enemy attacked.
if you saw in the old file the enemies attack after certain number in an alterable value in seconds
the problem showed when alterable values made the same attack (jumping attack) at the same time.
i changed the programing to be in miliseconds, so lets say after random amount miliseconds they,ll attack
however they wont attack at the same time since the time attack is set to random for each after an attack.
i discovered debugging the alterable values of each that this happened some times after they both had the same values
(since they only got 4 attacks), but the loop thing you sujested helped to include even more enemies to not to get stuck.
so thanks a lot.
Edited by vinicio
n/a
|
|
|