How do I make this chemical reaction work?

Get help using Construct 2

Post » Wed Apr 22, 2015 4:03 am

Hey! I am relatively new to Construct 2 and I was looking for some advice on a project that I am working on. Using Construct 2, I am trying to show how H2 and O2 molecules react when you add energy (in the form of a sprite) to the container. I tried setting it so when Energy collides with Oxygen, they both are destroyed along with 2 Hydrogen sprites and 2 Water sprites are produced. The only issue is, ALL of the water gets destroyed... :( I then tried to mess around with global variables and see if I could make it so when the global variable notices -2 to Hydrogen, then it destroys 2 Hydrogen sprites. Any ideas?

Any Input is helpful :D
Posts: 2
Reputation: 156

Post » Wed Apr 22, 2015 7:12 am

Your link is unavailabe..
When clicked it tells to ask permission.

But what we have here is a picking problem.
If you want to select two random instances of hydrogen it would be as easy as

repeat two times
pick random instance of hydrogen.


energy on collision with oxygen
> energy destroy
> oxygen destroy
- (subevent) repeat two times
-- system pick random instance of hydrogen
> hydrogen destroy
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
Posts: 6,160
Reputation: 19,775

Post » Wed Apr 22, 2015 2:13 pm

Thanks for the help! I'm going to test that out when I have a chance. I will also check the permissions for that google drive link, sorry that you were not able to view the .capx file.
Posts: 2
Reputation: 156

Return to How do I....?

Who is online

Users browsing this forum: mallorcaredes and 11 guests