impossible to have different players for each instance?

For questions about using Classic.

Post » Sat Jul 10, 2010 11:15 pm

if I have four copies of the same sprite, I can't assign them each a separate player? (for control purposes)
am I right on that?
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun Jul 11, 2010 12:18 am

You should be able to pick them via a private variable.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sun Jul 11, 2010 12:24 am

no I mean
if I want platform movement for instance to be controlling a player
I can't make two instances of the same platform sprite object be controlled by two controllers assigned to two different players
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun Jul 11, 2010 1:19 am

maybe create a object "collision trasfert"
when player has a collision with player transfer
-player start ignoring user imput

create the path you want the player to go,and the ai will do the job,then create another object"collision off" and stop ignoring user imput when play has a collision with it or use a timer

i dont know if it was helpful.
B
3
S
2
G
2
Posts: 136
Reputation: 1,347

Post » Sun Jul 11, 2010 5:55 am

[quote="lucid":3t1onqzp]no I mean
if I want platform movement for instance to be controlling a player
I can't make two instances of the same platform sprite object be controlled by two controllers assigned to two different players[/quote:3t1onqzp]

Ahh I see what you mean now. Nope it currently sets all instances of the same object to the same controls. Guess you could ask David to add a way to set the controls at runtime, or change the plug to allow dupes to have different controls.
Then again just adding another object shouldn't be that big a deal.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sun Jul 11, 2010 6:01 am

I wanted to make a multitude of platform behavior controlled sprites
and control them by Set Control
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun Jul 11, 2010 3:06 pm

You could add multiple platform behaviors to the sprite... 1 per controller I guess.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sun Jul 11, 2010 4:10 pm

I found the workaround I need anyway, but no I meant having hundreds of ai controlled npcs. It would have been really clean and easy to work with to justt be able to Set Control State "jump" or "move right" to control them. I suppose then there's the ten player limit as well. But still, ill put a feature requuest in to be able to assign player numbers at runtime. It seems like the most straightforward way to do local multiplayer
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Aug 10, 2010 7:57 pm

Has there been any progress on this? Assigning multiple Platform behaviors to an object didn't work for me (crashed the game at runtime, next to the fact that the solution is down right ugly :p ). I wanted to work on a game, where there's a score of different playable characters, and I'd like them to be playable by different controllers, and since copy and pasting code doesn't work well in construct, and since I'm not interested in copying and rewriting my movement control sheets for each player, and cloning the characters for each control... I also agree on the easier AI controlling with virtual button pushing for an AI.

Would it be hard to change the platform plugin? (I haven't informed myself on plugin programming yet.)

Lucid, what was the work around for the problem you had found?
B
1
G
3
Posts: 5
Reputation: 835


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest