Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Angelman's Invisible barriers (Mr. Mo suggestion)

Hey guys,

Regarding Mr. Mo's problem with the desert and the oasis and the nomads and what not, I came across the topic and had a suggestion, but the thread was already closed. :P If this problem hasn't already been solved, i'd like to help. Hopefully this could be helpful to someone else too. :yes:

What it does:

This event system creates an invisible barrier outside a town or something, and can display a message such as "You're too far away from the town. you need to get back." when you go too far in any direction.

Anyway, I was thinking about using variables and coordinates instead of actual events blocking the way or whatever, which is very tedious.

for example:

http://i156.photobucket.com/albums/t1/A ... rriers.png[/IMG]

The red squiggles is the barriers of the town (represented by building in the middle), and every time the person attempts to go past/into the red squiggles, a message comes up saying:

"Hey! Get back here! It's not safe out in the wilderness!"

to do this:

Create a parallel process event and name it whatever, then create variables "hero x" and "hero y" and set them to record the player's x and y tiles:

http://i156.photobucket.com/albums/t1/A ... inates.png[/IMG]

Next, create another parallel process event, and do this:

http://i156.photobucket.com/albums/t1/A ... eEvent.png[/IMG]

Done! :D

this way takes a little more time than the standard "put touch events everywhere" method, but it's a lot simpler, what with only two events as opposed to maybe 50 or 60 :P

So I hope this was useful to somebody, and I'm still a novice at posting here, so enjoy and please critique and comment away.:thumb:

Thanks guys.
 
yes but that adds a lot of useless events and confusion to the game :P. You could do it that way, this is just the way that works for me.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top