Switching between two player objects

New releases and general discussions.

Post » Sat Jul 06, 2013 12:37 pm

Hi!

I wanted to know if its possible to be able to switch between two player objects like in the game Thomas Was Alone. To give an example of what im talking about say you have objects A and B. When u select and control A, B is not moving or being controlled, only A. And when you switch to B, you only control B. Player A stays still and is not being controlled.

Thanks
B
1
Posts: 5
Reputation: 135

Post » Sat Jul 06, 2013 3:14 pm

Sure it's possible, you can do it all through a combination of built-in movement behaviors and events to scroll and switch between them (scroll to object event, as well as ignore movement depending on which is selected, and a global variable to say which object to control)
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481

Post » Thu Jul 11, 2013 1:41 am

Thanks for the answer!
Could you give me an example because I am new to this and don't really understand how to get the scroll object events and such.
B
1
Posts: 5
Reputation: 135

Post » Sun Jul 14, 2013 2:41 pm

Sure can Took me a little while to throw together but here's an example cap file: https://dl.dropboxusercontent.com/u/4714446/MultiChar.cap

You could use families to simplify events, but this method works well if each player object will use different behaviors and etc.

Edit: Oh, use keyboard keys 1, 2, and 3 to switch and arrow keys to move around. I set unbounded scrolling just so you can see the scrolling is working properly (in bound scrolling it will stop scrolling near edges of the level)Jayjay2013-07-14 14:42:20
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481

Post » Sun Jul 14, 2013 8:24 pm

thanks so much for the help
B
1
Posts: 5
Reputation: 135

Post » Sun Jul 14, 2013 8:30 pm

just another quick question (hopefully this isnt asking for too much) but i wanted to know if it is also possible to make buttons so when u jump over it it will make a platform move or a "hatch" slide open?
B
1
Posts: 5
Reputation: 135

Post » Wed Jul 17, 2013 3:27 am

Sure no problem I just threw this example together for you: https://dl.dropboxusercontent.com/u/4714446/HatchDoor.cap
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests