Answer

41 views
Skip to first unread message

Hugo García Ballesteros

unread,
Feb 17, 2025, 4:52:47 PMFeb 17
to PuzzleScript
Hi, I want to know if there is a way to have a multiple condition:
I want to check if the player stays horizontal to the wall, but also I want that if the player has a block at his right or a gap and then a block The result is gravity oriented to the left part.
Can anyone help me?

Sévan Kazandjian

unread,
Feb 17, 2025, 6:26:18 PMFeb 17
to Hugo García Ballesteros, PuzzleScript
Wouldn't
Horizontal [ wall | player | no Wall ]
Exactly check for this?
(Replace "no wall" by "Block or gap" if you prefer)


For adding gravity the scheme might be something like :

left [ wall | player | no wall ] -> [ wall | player gravity_left | no wall ] 
right [ wall | player | no wall ] -> [ wall | player gravity_right | no wall ] 

(Put the gravity token where you want; you probably want to remove it somewhere at the start or end of the rules)

Hopes this helps,
Sevan 

--
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/bceb4151-17a8-4e59-96f3-51c67a88117an%40googlegroups.com.

Zayd Mohammed

unread,
Feb 18, 2025, 5:27:02 PMFeb 18
to PuzzleScript
I’m not sure what you’re saying, but there’s an easy way to check if two conditions are both true.

first, you need a temp object:
conj
transparent

then:

[ putcondition1here ] -> [ conj putcondition1here ]
[ conj putcondition2here ] -> [ no conj putstatementhere ]

if you have a share link i can help more.
Reply all
Reply to author
Forward
0 new messages