How do I make 2 monster run and combat with each others

0 favourites
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hi, i'm new here.

    I have a problem in logic event, i don't know to make 2 monster A and B run and combat.

    Can u help me? Please

  • I think we need more information before this question can be answered.

    Is this game top-view or side view?

    What kind of behaviour are you using for the monsters?

    Is one of the monsters controlled by the player or are both computer-controlled?

    What are the conditions in which the monsters will fight?

    Does the combat consist of animations?

    Will who wins the combat be dependent on certain factors?

    And there will probably a lot more questions..

  • Dear,

    Thanks for you reply! Here is you information:

    1/ My intent like Tower Defense => How you call it? - In think it top-view.

    2/ The monsters i have add 8 direction, and bound to layout (to check when they meet).

    3/ no monster in my control, i just tap to spawns it and then he come to target.

    4/ bound to layout (to check when they meet but it fight one ).

    5/ Yes it does

    6/ If A monster come to castle A => B win, and monster A come to castle B => A win.

    thanks for your help

  • I'm sorry the question is still not very clear to me..

    When tapped a monster appears - this should be simple

    on tap - create monster at touch.x,touch.y

    I'm not sure what you think the bound to layout behaviour will do..

    How should the monster decide to which castle it goes?

  • Like plants vs zombie

    Plants fire and zombie run to eat.

    what behaviors LittleStain @

  • I guess you'd just want something like this:

    system every tick - monster 8 direction simulate pressing left.

    monster on collision with "whatever" - monster play attack animation

    monster on finished attack animation - "whatever" destroy

    If you want more complex movement and/or other ways to control the monsters you'd need extra conditions.

    You might also want to look at the line of sight behaviour and pathfinding.

  • oh, thank for all

    i try my best now

  • Hi there!

    I have new problems, my monsters combat each-other, I can show them who is target, who is friend

    Can u help me again

  • I'm not sure I understand the question..

    Your monster attacks a monster?

    What events are you using?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • uhm

    sorry about my bad english!

    I created 3 monsters (in team A) in line combat with 1 monsters in team B. But A team come near by and hit each others. I control monster by using variable: team.

    my condition:

    monsters => collision with any monsters | monsters play "atk" animation.

    My wish: monster => collision with monster in different team | monsters play "atk" to monster in different team.

    how can i solve this problem?

    thanks for your help

  • uhm

    sorry about my bad english!

    I created 3 monsters (in team A) in line combat with 1 monsters in team B. But A team come near by and hit each others. I control monster by using variable: team.

    my condition:

    monsters => collision with any monsters | monsters play "atk" animation.

    My wish: monster => collision with monster in different team | monsters play "atk" to monster in different team.

    how can i solve this problem?

  • To help solve the problem you should provide your capx alongside your post.

    Posting your capx will make it easier to see what the issue might be. Provide it in a online hosting file service like dropbox or google drive, whatever suits you best.

  • ok Kyatric,

    this 's my file,Thanks you

  • Here you are ! [quote:avos6fcy]https://www.dropbox.com/s/ao363ggmwtau4xt/ChinhChien.capx?dl=0

  • You can do like this,

    1. give each monster an instance variable by right click at the object > instance variable > add > Name it "Team" and give Initial value to either text or number; text as A/B or number as 1/2

    2. On the event, Object(monsterA) on collision with another object(monsterB)

    3. Add another condition to the event | object(monsterB) compare instance variable (team variable) = to B or 2

    4. give action to the event | monster play "atk" animation

    *meaning if monster from team A hit something and that thing has instance variable of B, it will atk, else it won't

    * and you have to give the same concept to monster of team B also to see if it collide with monster team A.

    This should solve your problem.

    Cheers!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)