Hi. How can I simplify this event sheet so I don't have to clone some events and change the instance variables of two objects for everyone ?
I have 2 sprites that have a instance variable called "nr".
What I am trying to do is this event/condition:
If Moving_Platform_Metal instance var ("nr") is the same with the MovingPlatform_Lever instance variable ("nr") > do this
https://www.dropbox.com/s/aj2m5w7giubtg ... l.jpg?dl=0
System Compare 2? If moving_platform_metal.nr = moving_platform_lever.nr then do this. Probably one event for all of that.
I've tried that but is not working. I think I have to add something more to it ....
Can both NRs be something other than 1,2,3,4?
Just numbers, from 1 to 10
Does the same pattern follow for 5 to 10? There's no reason that "compare two numbers" shouldn't work in that case.
Hmm, I don't know what's wrong then, if I don't find the problem I will just clone all the events and replace the numbers, from 1 to 10.
You shouldn't have to add any more to it, which bit is not working? Run it in debug and see if the variables are as you expected.
Here is a reproduction of what I have in my project.
https://www.dropbox.com/s/a6qv3uzabgf2t ... .capx?dl=0
You need a "For each" MovingPlatform at event 87, then drag the current event as a subevent. To do the setup, you need to pick each object individually, so you can then pick the corresponding Level.
I tried but is the same. I don't know what I'm doing wrong
Is the same result as mine. Is not working correctly. When player is overlapping the Lever and you press E, the Platform with the same number (instance variable "nr") as the Lever should activate or deactivate that platform.
Develop games in your browser. Powerful, performant & highly capable.
http://www.blackhornettechnologies.com/ ... _BHT4.capx
Changed a few things. The compare wasn't sufficient. Need to Pick explicitly.
Thank you blackhornet !