Charas-Project
Game Creation => Requests => Tutorials => Topic started by: Shady Ultima on November 05, 2009, 02:46:18 AM
-
Is there anyway to not allow your character to move?
It sounds like a noob question I know, but I'm trying to work in a shield, where when it's up (by pressing shift) the character can neither attack nor move, but is unable to be hurt.
He doesn't attack, and is unable to be hurt... but I can't figure out how the HELL to make him not be able to move all around the damn screen. This is an ABS... anyone know how to help me?
-
What you do is make a parallel process event with a key input process for each of the four directions. Then make a branch for the four directions (1-4). In each branch, move the hero with a wait command. You can add a wait .1 or .0 at the end to reduce any lag that might come up.
What this does is interrupt the movement that the hero would normally do, and makes them wait (not move) instead.
-
Awesome! Thanks. I can't believe I didn't think of something that simple...
-
I got that...
I may need some more help. Is there anyway to seperate numbers in a variable into their placement?
Like 'if last digit = 1' show '1' picture?
Or do I actually have to make pictures of every number from 0 all the way up?
-
I think Variable Modulus does that. Like 'MOD 10' will store the digital in the ten place. For example, using 'Mod 10' on 256 will store the value 5 in a variable of your choice. Then, after many conditional branches, it will sort it out. 'IF variable 'Second place' is '5', display picture '5' at 'The spot'. If you can, take a look at the source codes of some CMS's that also display level or experience. That way, this all becomes more algorithmic than arbitrary branches going on indefinitely from 0.
Also, consult tutorials on various websites to verify I know what I'm talking about, because I'm not 100% sure.
-
Thanks, that was pretty much how you do it. I got it.
Final (I hope question) how do you crop an image to fit in some sort of frame. Like I have the frame on the screen, and the picture I have is larger than the frame, on purpose. The picture I have moves up and down, left to right, and I want anything that is outside of the frame to be cut off. Is that possible?
-
I guess I'm kind of finding it hard to follow you on this one. Is this an in-game frame, or what? A screen might help.
-
A mini map, essentially. There's a frame that shows up on the screen, and in that frame, the map shows. But some of my maps are a LITTLE too big for the frame, so I want to know if I could crop the map, USING the frame, and when you move to where the mini map cuts off, it scrolls up, and shows that area, and cuts off the bottom.
-
You can't do that at all, the best you could do is have a large frame displayed over the other parts of the map, but thats not practical. Rpg maker doesn't allow cropping though. I guess you could split the image into a lot of small images and display them and erase them as necessary, but again, thats not really practical either.
-
Perhaps you could do a HUD display, where you have a mini-map for each 'room' or map (depending on what you're doing, I suppose) and you just swap out pictures accordingly. You'd just need real generic things as well, a couple of colors like black, white, red, blue, kind of a Zelda map. Maybe.