Question about character movement

74 views
Skip to first unread message

perl

unread,
Nov 7, 2024, 5:47:33 PM11/7/24
to PuzzleScript
Hello, I need to know how to create a movement routine for a character. I need the character to follow a movement routine while the main player moves freely around the map. Thank you. 

Chris Pickel

unread,
Nov 7, 2024, 11:25:06 PM11/7/24
to perl, PuzzleScript
Here’s a sample puzzle I put together with some different kinds of movement:
https://www.puzzlescript.net/editor.html?hack=f8d040b1e87901a565aedca1812f085c

I included three examples:
  • Moving back and forth horizontally or vertically
  • Walking along a wall and turning to follow it
  • Following a pre-programmed routine marked on the floor (the markings could be invisible/transparent)

On Fri, Nov 8, 2024 at 7:47 AM perl <benja0...@gmail.com> wrote:
Hello, I need to know how to create a movement routine for a character. I need the character to follow a movement routine while the main player moves freely around the map. Thank you. 

--
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.
To view this discussion, visit https://groups.google.com/d/msgid/puzzlescript/7a7abb45-1cb6-4b3f-bd8b-8fa987aad63bn%40googlegroups.com.

perl

unread,
Nov 8, 2024, 2:18:24 PM11/8/24
to PuzzleScript
Understood, Thank you! But If I want that the movement to be automatic, without interaction. It Is possible?

Chris Pickel

unread,
Nov 8, 2024, 7:48:20 PM11/8/24
to perl, PuzzleScript
Ah, gotcha. Yes, you can do this with realtime_interval. I’ve updated my example.
Aside from adding the realtime_interval, you’ll also want to change the rule that activates enemies so it is conditional on the player not moving:
[stationary Player] [Enemy] -> [Player] [action Enemy]
If that’s omitted, enemies will be activated both when the player moves and at the real-time interval, so they will move faster when the player is moving.

zartan917

unread,
Mar 21, 2025, 12:25:42 PMMar 21
to Chris Pickel, perl, PuzzleScript
Reply all
Reply to author
Forward
0 new messages