Position player at start of game

23 views
Skip to first unread message

Orangery

unread,
Nov 15, 2024, 12:38:47 PM (13 days ago) Nov 15
to PuzzleScript
I want to position the player on a section of track to trigger an action before play starts.  I thought I could set this up in the editor but that doesn't allow for layers, except for background and another object.

I can randomly place objects (thanks to Aldi Fauji's help), so something like this works flawlessly :
random [ Track no Obstacle no Diversions] [ Start ] -> [ Track Item_1 ] [ Start ]

But positioning a player over a specific object (say a length of track) at the start of a challenge does not work properly:
[Track_X] [Start] -> [Track_X Player] [Start] or [Track_X] [Start] -> [Player] [Start] 

Thanks in advance.



That Scar

unread,
Nov 16, 2024, 6:24:52 AM (12 days ago) Nov 16
to PuzzleScript
I'm assuming you have run_rules_on_level_start
What's wrong with the first line? You said it works flawlessly and it also seems to do exactly what you wanted - place Item_1 on a random Track.
For the "editor" part - you can define a tile to have whatever you want! But you have to do that in code - so if you want to have a cat on a tree on the world on an elephant on a turtle, you have to specifically say so in the legend and assign a new symbol for this exact combination. Alternatively, there are also some generative methods: Generating parts of the levels within rules - can make a checkerboard, for example, so you don't need two times as many symbols just to have a simple pattern.

If you could share more, it would be easier to help - right now, I don't understand what hurdle you're facing.

Orangery

unread,
Nov 22, 2024, 4:34:43 PM (6 days ago) Nov 22
to PuzzleScript
I stupidly missed off the line 'run_rules_on_level_start'.  Game now working as it should.  Sorry to waste your time.
Reply all
Reply to author
Forward
0 new messages