Pulp Exits & Player Location

I am hoping I am just an idiot because using Pulp has been a terrible experience so far and I thought it would be much easier than learning the SDK. For context, I have written a full game using the SDK and Pulp has been totally aggravating to use, the instructions are poorly written and I know I am following them correctly but I am not seeing results when I output my file to test. Here are my questions:

  1. What am I doing wrong with exits? I have them clearly linked and when the player comes into contact with them nothing happens:

  1. How do I reference the player's current x and y location as well as the room he or she is in? I would like to be able to use the same sprite for information over and over (picture an "i" icon that is used throughout the game) and just reference what room the player is in and the x/y coordinate of the player which would then call the correct text the information icon displays. For example, if the player is located on 1, 1 in the dining room and touches the icon (at 1, 1) it says "dining room". If the player is on a balcony in another room at 2, 2 the "i" icon says "balcony" when it is touched. I don't want 50 sprites that have the same image that each have a unique "say".

Thanks in advance. These things were obvious in the SDK or you could find examples easily. I am hoping I am overthinking it.

You need to select the exact place the exit comes out in and then click there in the little exit window.

1 Like

Ugh, thanks man. I feel stupid, but I get it now. There's a little mini map in the top right hand corner where you can place the exit. It was not obvious to me.

You can get these with event.px and event.py for the player's coordinates and event.room for the name of the current room. However you might want to use event.x and event.y instead to get the coordinates of the tile being interacted with. That way it doesn't matter which direction the player interacts with the "i" icon from.

My approach would probably be something like this in the "i" icon sprite script:

on interact do
  call "{event.room}_{event.x}x_{event.y}y"
end

on roomA_12x_7y do
  say "Some unique text"
end

on roomB_3x_9y do
  say "Some different text"
end

I think calling events like this is nicer than having an ever expanding and nested if...else if...else if... - the only thing to be careful of is that you can't have spaces in your room names (as you can't have spaces in event names).