This site requires JavaScript, please enable it in your browser!
Greenfoot back
Adambruzac
Adambruzac wrote ...

2018/12/27

random

Adambruzac Adambruzac

2018/12/27

#
Hello, i have an outer wall and an inner wall and i want to spawn an actor within this wall.Could anyone give me a hint how to do this?
danpost danpost

2018/12/27

#
Adambruzac wrote...
Hello, i have an outer wall and an inner wall and i want to spawn an actor within this wall.Could anyone give me a hint how to do this?
Do you mean "between" (and not "within")?
Adambruzac Adambruzac

2018/12/29

#
Between yes. I figured out how to stay between the walls on the length, but when it spawns, I need to find a way on how to not exceed the walls on the height if that makes sense.
danpost danpost

2018/12/30

#
Adambruzac wrote...
Between yes. I figured out how to stay between the walls on the length, but when it spawns, I need to find a way on how to not exceed the walls on the height if that makes sense.
Sounds like you have 4 conditions for one coordinate value and 2 conditions for the other; but the order of coordinates could be swapped. So either (the x-coordinate is between the inner and outer walls and the y-coordinate is between outer walls) OR (the x-coordinate is between outer walls and the y-coordinate is between the inner and outer walls). By "inner and outer walls", there are two places where this can occur. That is why there are 4 conditions to be checked for that.
You need to login to post a reply.