Best way to avoid repeating the same code in my events ?

Just started using Construct 2? Post your questions here

Post » Mon Dec 14, 2015 9:31 pm

Hi folks,

I think that is a simple question but my brain is stuck, and I need a little help.

My first game is getting bigger and I now have 4 big chunks of exactly the same code in various points in the Events Sheet.

Is there a way to keep this code only once, and just put a reference the other 3 times ?

Thanks for any help.
B
4
S
1
Posts: 5
Reputation: 365

Post » Mon Dec 14, 2015 9:46 pm

Using the function object should work..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 15, 2015 6:24 am

Thanks for the hint. I will read more about the function object.
B
4
S
1
Posts: 5
Reputation: 365


Return to Beginner's Questions

Who is online

Users browsing this forum: Zamargo and 0 guests