Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a flexible "player spawns here if X" mechanism #53

Open
oliver-ruehl opened this issue Feb 19, 2017 · 4 comments
Open

Implement a flexible "player spawns here if X" mechanism #53

oliver-ruehl opened this issue Feb 19, 2017 · 4 comments

Comments

@oliver-ruehl
Copy link
Contributor

As I develop more and more levels, I'm struggling in positioning the player.

Example "Castle":

  1. Scene transition is placed on castle door
  2. Walk to door
  3. Enter castle interior
  4. Exit castle
  5. Player spawns too far left (not near the door)

So what it needs to do is check:

  • Have I been in place X?
  • Where did I exit the level?
  • Where do I need to spawn now?

This will also be useful for more expansive caves, shortcuts etc.

I know that this is an easy task, but I'm swamped with GFX work.

@oliver-ruehl oliver-ruehl added this to the Beta February 2017 milestone Feb 19, 2017
@ivanskodje
Copy link
Member

I understand what you mean. Although I think we are overthinking this.
There are many many ways of handling this. The easiest (but not the best) way of doing this is to create booleans for each, and then check if they all have been fulfilled.

A better way of doing this, might be to organize each objective in a List, and every time an objective is complete, we reduce the number of remaining objectives until 0 remains - which means it is time to "do whatever".

This is just what I am thinking from the top of my head. I am sure there are even better ways of handling it.

@oliver-ruehl
Copy link
Contributor Author

Can you make an example of such a list?

oliver-ruehl added a commit that referenced this issue Mar 11, 2017
The Yan problem + #53(the castle map needs a similar script to the forest/mountain)
@shelltitan
Copy link
Contributor

I fixed this issue for mountain/forest, if a script that is similar to the forest/mountain.gd script gets added to the castle then it will work with this method too.

@oliver-ruehl
Copy link
Contributor Author

oliver-ruehl commented Mar 11, 2017

Ok, ill have a look and see if i understand it ;)

@shelltitan shelltitan self-assigned this Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants