Fightinggame project, i will ask my questions here
I've made several threads in which i asked how to improve my game i am making. Instead of creating new threads i am going to ask all my future questions in this one.
Quick game overview (i've explained this several times in my former threads. But for those who don't know):
I am currently making a Double Dragon-ish game with a fake 3D-perspective (where you can move in eight directions on the playfield).
My first question is:
i am working on a functional AI-system for the enemies that follow the player around. Ive made movement etc for them, but i want the enemies to "not like overlapping eachother". How can i make them walk away from eachother or at least "glide" apart when they overlap eachother?
Second question:
is there any way to "copy" all the events from one enemy to another? then also add more to the new one? without changeing everything manually in the event-editor. like, if enemy1 is having a functional AI, where he walks towards the player and hits and blocks his attacks etc. and copy that to a new enemy(2).
Re: Fightinggame project, i will ask my questions here
for your second question, you could set qualifiers for your enemies. There are preset ones and enemy is one of them. so you could make 1 condition for everything that is an enemy. when your enemy is selected click the option that says "qualifiers" in your properties bar.
Re: Fightinggame project, i will ask my questions here
Just put your enemies in a group and assign that group the commands you want all of those enemies to have.
Re: Fightinggame project, i will ask my questions here
thx for the answers!
to xXjbroXx: ive set my enemies to "enemy"-qualifier. but i do not know how to use it? how does it work? i guess i need to do something more than just set the qualafier to enemy?
to Ausomeman: how do i group objects togeather and then assign that group commands?
anyone have an answer to my first question yet? :)
Re: Fightinggame project, i will ask my questions here
A Qualifier is a group, of sorts. Every object you add to the same qualifier will be part of that qualifier. Then you can write your code to affect the qualifier. By writing your code this way, you are writing code that affects all members of the qualifier.
But just be smart about how you use them. When it comes to your enemy AI, for example, you will still probably need to handle it on an enemy-by-enemy basis. But basics like collision and health will definitely benefit from qualifiers, since it will use less code overall.
Re: Fightinggame project, i will ask my questions here
thx for the explanation,
but where do i write the code to affect the qualifier(s)? i cannot find it in the event-editor.
Re: Fightinggame project, i will ask my questions here
What ever qualifier you assign, the icon should be at the top of the event editor row along with your other objects.
Marv
Re: Fightinggame project, i will ask my questions here
effin' sweet. got it working with groups now! thx people
if anyone can answer my first question now that would be gr8 :)
if i have any more questions ill keep posting them in this thread.
Re: Fightinggame project, i will ask my questions here
@ Question 1: Maybe you should code them to not overlapp by checking their positions and telling them to change directions at the appropriate times? It will depend heavily on how you handle their AI in general, so it is not easy to give a single answer to this.
Re: Fightinggame project, i will ask my questions here
hrm okay, maybe if i explain further:
i used the example-file that came with the download of the extension "advanced direction object" (in the example-file - "rotate movement"-frame) and applied it to my enemies along with LB's enemy selection movement example he made for me in another thread.