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.

Need help whit my game

aram

Member

is it possible to make two floors on one map whit a script or eventing?,
i made some zombies that are supposed to kill the player.
twofloors.png


look at the zombie, he is supposed to go trough that first room and come up to the hero and kill him, but how?

i tried to make events that looks like there are two floors but it doesnt work
 

Jason

Awesome Bro

Umm, I don't understand what you're asking, is it possible to make two stores, as in shops, on the same map ?

If so, yes o.O

Just make two events with a Shop command, and add different items to each NPC...
 
Just remove all those events you used to make the second floor and add in the tiles to actually make the second floor (use the second or third layer) and it should work... as for the zombie, he'll follow you up to the second floor so long as he's set to 'Approach' and there's nothing in the way (stupid AI XD)
 

aram

Member

NO SORRY:(
i really want it on the same map because it would mess up my game. its like call of duty 5.
you have to survive zombie attacks as long as possible, if i make two maps all the zombies would dissapear
 
okay... back to your first map then... the first three events (the ones on the door) should be Event Touch and the command should be 'control switch: upper floor on' for instance... the rest of them should be set to switch with 'control switch: upper floor on'

Make a second page on the first three events which turns off 'control switch: upper floor on' which is switched on by a self switch 'A' when the first page is activated... then when you go back over it it should switch to a third page activated by self switch 'B' which is a copy of the first page...

although i just realised this probably wont work as it wont stop the zombie going through it o.O
 

aram

Member

are you totally sure??
i think that some scripter could make this work whit some knowledge.
and btw do you think i should make a new topic in script request about this?
 
Well its not really an issue with scripting, you could set it so that the above floor is active but that would mean the room under it would need to be empty, there could be no objects visible or active otherwise effectively the player would be blind. If I've understood the thread correctly, its very hard to understand at the moment you may want to explain a lot more in depth and then people may be able to help you a little more.
 
It's possible, but will be difficult. Showing the different floors isn't the hard part; it's giving the zombies the AI to know to climb stairs when the player's on a different floor.

You can try something like this. Turn on a switch when the player climbs to Level 2 (and turn it off on Level 1). Make the second floor graphics events that appear when that switch is on.

Now, use four pages for the zombie. On the first page, don't check any conditions, and set the zombie to "Approach."

On the second page, check the Condition "2nd Floor Switch == ON", and have him move toward the bottom of the stairs (make sure to block the top, so it doesn't pass there!). You'll need some sort of pathfinding script, unless you can figure out a way to do some complex conditional branches.
Still on this page, set it to "Parallel Process" and use conditional branches to check if the zombie reaches the top of the stairs. (Try this: "$game_map.events[ID].x == X and $game_map.events[ID].y == Y" inside a branch.) If it's met, turn Self-Switch A on.

Make a third page, with the Conditions "Self-Switch A == ON". This is when the zombie is on the 2nd floor, but the player is on the 1st. Set the graphic to a lower opacity (to show that it's on the 2nd floor, when the player's on the first). Make him move toward the stairs. On Parallel Process, use a Conditional Branch again to check when he reaches the bottom of the stairs. When he does, turn off Self-Switch A.

On the final page, check both Conditions "2nd Floor Switch == ON" and "Self-Switch A == ON". This is when both the player and the zombie are on the 2nd floor. Use a simple "Approach" move route.

I haven't tested it, but hopefully it should work. Good luck with it!
 

Zeriab

Sponsor

The problem here is that in the default scripts the map movement grid is internally strictly 2D while you want to have a 2.5D map.
You can try to introduce it through events where each zombie have to be aware and manage its own z-value. Regi's suggestion is a specialization where you have only 2 values.
With the amount of zombies you are talking about I doubt you'll manage to get it to work with events without horrible lag.
You can try to cheat in the sense of zombies you can't see don't actually move like zombies, but instead teleport around or some other less cpu consuming way of traveling.
I would suggest requesting a script since this a problem where you can benefit greatly at low-level modifications. Why update the sprite of zombies you can't see? You could perhaps also make the AI controlling the zombies fine-grained for zombies you can see and coarse-grained for zombies you can't see.

*hugs*
- Zeriab
 

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