Wierd Collision Bug?
Hey Everyone,
I'm trying to make a simple game to show my cousin what GameSalad can do. We're almost finished exept for this bug. Our controls is press and drag. Now I know collisions do not work when constrained, but what about in a rule when overlaps or collides? If I don't even touch the actor to constrain it, and lay it right in the center to overlap, GameSalad won't pick it up. 0.9.5 bug?
I'm trying to make a simple game to show my cousin what GameSalad can do. We're almost finished exept for this bug. Our controls is press and drag. Now I know collisions do not work when constrained, but what about in a rule when overlaps or collides? If I don't even touch the actor to constrain it, and lay it right in the center to overlap, GameSalad won't pick it up. 0.9.5 bug?
Comments
Let me get this streight:
To drag the actor you constraining it to the mouse position. You basically want to pick up an object (another actor) whilst you are dragging it?
Could you explain in more detail your problem, it's a bit confusing.
Giacomo
The controls is from this video:
Anyway, when the player collides with the thing in the center, it is set to change level back to one. But it doesn't recognize the collision.
Matt
"X" and "Y" and "W" and "H" and "collide"
In the actor you are dragging:
Constrain X to self.positionX
Constrain Y to self.positionY
Constrain W to self.Width
Constrain H to self height
In the colliding actor:
Rule
------------
When attribute Game X > (sel.positionX+(attribute W/2)+(self.width/2))
or When attribute Game X < (sel.positionX-(attribute W/2)-(self.width/2))
Rule Inside First rule=
When attribute Game Y > (sel.positionY+(attribute H/2)+(self.height/2)
or When attribute Game Y < (sel.positionY-(attribute H/2)-(self.height/2))
Change attribute game.collide to 1
That will probably although I havn't tested it.
Note: when game.collide=1 you can apply the same rules as you would have done if the actor recognised the collision.
Giacomo
Matt
Giacomo