Problem with behaviors and overlaps

0 favourites
  • 1 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • File: dl.dropbox.com/u/5214903/GM/pvsztests.capx

    Heres an example of a problem that i encountered and just cant seem to get it done right.

    Basicaly there are copies of "flame" sprites in two groups making a road or something.

    They are distinguished by manualy set up number in their "group" variable same like the "item" sprites (1 or 2).

    When the "enemy" sprite touches the "flame" sprite,its group number changes to same like the the "flame" sprite has.

    This way the group number of "enemy" should match with the group number of "item" sprite.

    The plan is to make active "item" sprite and shoot only when the "enemy" sprites group number matches (think of a game like plantVsZombies).

    Test1:

    With event1 the "enemy sprite is positioned to the mouse so by overlaping the "flame" sprite the plan works just fine and the "item" sprites respond as they should.

    Test2:

    But when you toggle event 1 and untoggle event 2, you spawn with left and right button "enemy" sprites that move left over the "flame" sprites.

    By overlaping them,it is suposed to give each "enemy" sprite its group number 1 or 2 and by that activate the "item" sprite to shoot inmediately.

    This turns out to be very buggy and uneffective with custom movement and bullet behavior.

    In otherwords,the game doesnt respond the same by overlapps by the two methods in event 1 and 2.

    Is this a problem in programming maybe or my plans for the project just wont work this way?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)