I'm trying to set up a way for the rooms to have a variable that places the player in a start coordinate. So I have this in the room script:
on enter do
start_pos_x = 7
start_pos_y = 10
then in player script:
on emter do
What am I doing wrong?
emter (in the player script) a typo in your post or in your code?
No, the typo is here, not in the code
player_pos_y aren't properties of
I'm sorry, what do you mean?
Those aren’t valid variables. That is effectively saying
How do I make them valid variables?
What I mean is those variables don’t exist.
event contains a predefined, set of read-only variables. You can’t assign new ones to it. You probably meant something like
But in your specific example I would probably just tell the player where to go from the room’s
enter handler like so:
on enter do
Oh man! That is so much simpler! I didn't know you could do that. I thought everything that affects the player had to be in the player script! Sorry, I'm new to this (second day). Thank you!!!
I’ve updated my answer. I completely forgot that
goto always and only applies to the player so there’s no need to
tell event.player here.