Well, after a lot of time with GD and Python I crash into another problem:
Like title says: If a condition is satisfied when, i.e. two spheres come in collision, how can I refer to one or another of them independently?
Here:
If Sphere collision with Sphere: Object_delete Sphere1 (i.e. the first)
var x > 1 (only to complete the format): Object_create Cube at position Shere2.position()
I would like to know how to operate with their variables and parameters (if I could) too: if Sphere1.velocity_x > Sphere2.velocity_x ==> Actions.
I’m afraid there is no easy way to distinguish the two objects ( How can Game Develop guess which object is the first one ? )
But you can use a For Each event to achieve your goal :
Conditions : Sphere collision with Sphere
Actions: Set variable Index to 0.
Sub event :
For each object Sphere :
Condition : Variable index is = 0
Action : Destroy the object and set index to 1
For each object Sphere :
Condition : None
Action : Create a Cube at Sphere.X();Sphere.Y()