[Question] Two Player Objects?

87 views
Skip to first unread message

von...@gmail.com

unread,
Nov 27, 2016, 7:36:44 AM11/27/16
to PuzzleScript
I've only gotten started on PuzzleScript yesterday, so greetings!

Anyways, stupid question: How can I have two objects acting as one identical player object in PuzzleScript? I saw the sumo wrestler example in the Rules 101 Documentation page, but the sumo wrestler won't move unless the Player objet does, even though I saw no require_player_movement line in the heading.

Stephen Lavelle

unread,
Nov 27, 2016, 7:49:25 AM11/27/16
to von...@gmail.com, PuzzleScript
If you want to have multiple copies of a single player type, you can just place multiple players in a map and they'll move in parallel if they can?

If you want to have multiple things that can all be controlled like a player is - see http://www.puzzlescript.net/editor.html?hack=f23602e5fe061b16e9c41c48cddfbc96

If you want to have multiple player objects that are forced to move in parallel (the don't move if one is obstructed), it depends on the rest of the game how you'd implement that.

Any of these answer your question?

On Sun, Nov 27, 2016 at 12:36 PM, <von...@gmail.com> wrote:
I've only gotten started on PuzzleScript yesterday, so greetings!

Anyways, stupid question: How can I have two objects acting as one identical player object in PuzzleScript? I saw the sumo wrestler example in the Rules 101 Documentation page, but the sumo wrestler won't move unless the Player objet does, even though I saw no require_player_movement line in the heading.

--
You received this message because you are subscribed to the Google Groups "PuzzleScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puzzlescript+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

von...@gmail.com

unread,
Nov 27, 2016, 8:09:31 AM11/27/16
to PuzzleScript, von...@gmail.com
> To unsubscribe from this group and stop receiving emails from it, send an email to puzzlescript...@googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Ah, I see now! So youcan classify multiple objects to one, huh? Thank you very much, was quite surprised to see none other than the dev himself answer my question!

von...@gmail.com

unread,
Nov 27, 2016, 8:17:08 AM11/27/16
to PuzzleScript, von...@gmail.com
On Sunday, November 27, 2016 at 7:36:44 PM UTC+7, von...@gmail.com wrote:
> I've only gotten started on PuzzleScript yesterday, so greetings!
>
> Anyways, stupid question: How can I have two objects acting as one identical player object in PuzzleScript? I saw the sumo wrestler example in the Rules 101 Documentation page, but the sumo wrestler won't move unless the Player objet does, even though I saw no require_player_movement line in the heading.

And ah, just messed around again, and I found a conflict in interpreting the algorithm to rigid body. Apparently after grouping them (the player object and the other player object that's a rigid body) as one, PuzzleScript no longer identifies them as a 'single' object?

Stephen Lavelle

unread,
Nov 27, 2016, 9:46:38 AM11/27/16
to von...@gmail.com, PuzzleScript
indeed not. are you doing stuff with the rigid body keyword? what sort of stuff? perhaps there are still workarounds

--
You received this message because you are subscribed to the Google Groups "PuzzleScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puzzlescript+unsubscribe@googlegroups.com.

von...@gmail.com

unread,
Nov 27, 2016, 11:03:49 AM11/27/16
to PuzzleScript, von...@gmail.com
For example, this http://www.puzzlescript.net/editor.html?hack=a54490c7a7cf6b0814e95f286b44bf09 (taken from the Rigid Body Doc page). The moment I assign the rigid body objects to the player class, they all break apart and act like normal player object
To unsubscribe from this group and stop receiving emails from it, send an email to puzzlescript...@googlegroups.com.

Stephen Lavelle

unread,
Nov 27, 2016, 12:01:58 PM11/27/16
to von...@gmail.com, PuzzleScript
Doing something like putting a single player object on its own hidden layer, invisible, and having that if the player moves at all, then other objects will also try move in the same direction, might be good for your purposes?

To unsubscribe from this group and stop receiving emails from it, send an email to puzzlescript+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages