Another Behaviors Question

For questions about using Classic.

Post » Sun Oct 26, 2008 8:46 pm

Perhaps I have missed something, but is there a way to take controls that have been mapped and translate them into a behavior pattern for use over multiple sprites? If not, can this possibly be accomplished via use of grouping sprites under families if one is intending to be able to switch out sprites in game? Thanks for answering my beginner questions.
B
2
G
4
Posts: 49
Reputation: 1,148

Post » Mon Oct 27, 2008 1:04 pm

What exactly are you wanting to do? Move lots of objects using the same buttons or something? Sorry but I'm probably just missing something simple in your question.

If you want to move lots of objects using the same key presses, that's easy enough... just make the same control type for each object... IE platform, 8 direction, etc.

If there is something else you are trying to do, then you might have to fill in the blanks... I'm pretty bad at trying to "get it" at times. :P

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Oct 28, 2008 1:20 am

Sorry, i think I need to be a little more careful when phrasing my questions. I am looking to create a simple ship vs. ship game, akin to spacewar. However, I am also interested in making different ships with different stats. The idea that I am using has a custom control scheme for moving the vessel, and I was hoping to apply that control scheme to each ship involved. However, as it is a custom scheme, and many possible sprites are going to be used for each player as well as an AI controlled opponent, is there a way to apply this universally so that when the player selects his/her ship the control scheme will carry over regardless of the ship used?
B
2
G
4
Posts: 49
Reputation: 1,148

Post » Tue Oct 28, 2008 1:58 am

Move with arrows. Click a new box to move that box instead.

http://willhostforfood.com/files3/39399 ... Player.cap

It doesn't use a custom control scheme, but the important part isn't whether it's using behaviors, but rather which object has the "active" variable turned on. You could just add a "value('active') is equal to 1" condition to all of your movement code.

As far as which of many different sprites are being controlled, that's what Families are for ;)

(And yeah, I realize it could probably be made much simpler, I just sort of threw it together.)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Oct 28, 2008 3:27 am

That's awesome! Thanks a bunch!
B
2
G
4
Posts: 49
Reputation: 1,148


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests