Carrying an item

89 views
Skip to first unread message

holywa...@gmail.com

unread,
May 10, 2016, 9:55:21 AM5/10/16
to PuzzleScript
So I want my player to carry a key to a lock, Instead of pushing key to lock, I want to be able to hold it, so it takes up only one space, not 2. And like press X to place it in lock or just when he touches it

Stephen Lavelle

unread,
May 10, 2016, 10:09:13 AM5/10/16
to Jp marvin, PuzzleScript
Hi!

What have you tried so far?
Could you share links to some attempts you've made?

best,

s

On Tue, May 10, 2016 at 2:55 PM, <holywa...@gmail.com> wrote:
So I want my player to carry a key to a lock, Instead of pushing key to lock, I want to be able to hold it, so it takes up only one space, not 2. And like press X to place it in lock or just when he touches it

--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

holywa...@gmail.com

unread,
May 10, 2016, 11:03:11 AM5/10/16
to PuzzleScript, holywa...@gmail.com


I am still new to puzzlescript so I didnt try many things, i really tried only 1 thing.

link to code:

http://www.puzzlescript.net/editor.html?hack=210e09762b88af626dc89d7f8a3976a3

It worked but very messy, (i tried this after i posted this post) After i did this, I was able to clip through solid walls. And I cant go diagonal, I can only if i go slow, like: left. up. left. up. hard to explain this, you can probably see for youself

ncr...@gmail.com

unread,
May 10, 2016, 12:49:20 PM5/10/16
to PuzzleScript, holywa...@gmail.com
On Tuesday, May 10, 2016 at 11:03:11 AM UTC-4, holywa...@gmail.com wrote:
> It worked but very messy, (i tried this after i posted this post) After i did this, I was able to clip through solid walls.

On examining the code, it seems the walls were never solid in the first place- it has to be on the same layer as your player for him to count it as solid.

Ivan Koswara

unread,
May 14, 2016, 10:56:43 PM5/14/16
to PuzzleScript, holywa...@gmail.com
www.puzzlescript.net/editor.html?hack=b2be905c3c60ead0ee00b282f0926d12

Made a new object called heldkey, which will move together with the player. If the player moves to a key, the key becomes heldkey. This way, the player and the key occupies only one square.

Jere Majava

unread,
May 23, 2016, 5:13:23 PM5/23/16
to PuzzleScript, holywa...@gmail.com
You could also make two player objects, eg. "hero" and "herowithkey" and define them both as player in LEGEND.

Reply all
Reply to author
Forward
0 new messages