Problem with behaviors and overlaps

Discussion and feedback on Construct 2

Post » Fri Apr 06, 2012 10:40 am


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).
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.
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?
Posts: 232
Reputation: 8,106

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests