![]() |
Brush By - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Brush By (/showthread.php?tid=824) |
Brush By - Matt2 - 12-03-2007 Name: Brush By By: Matt(Silver) Dificulty: 1/5(with slight understanding of code) Ever wondered what a 2D game would be like with nothing but assholes? You make a narrow path, and a group of them decide to block the way? Or how about when you got a pker on your server who needs to run, but an NPC is blocking his way to safety? Well, you can fix all that with my 'Brush By' Feature. Simply, I just made it to where if you move against a Player or NPC for 2 seconds, you'll 'walk' by them. Of course, it might not be the best thing to implement in the open, but in places like Cities, Towns, Inns, pretty much any safe point you have, that'll be a nice feature to have. *Everything is Client-Side* All you have to do is add one variable. At the top of modGameLogic, declare this: Code: Private BrushBy As Byte Now, you've got the variable, what do you do? Look for these comments in the sub CanMove Code: ' Check to see if a player is already on that tile and Code: ' Check to see if a npc is already on that tile Wherever you see that code, in that little 'block' of code, replace Code: CanMove = False With Code: If BrushBy < 20 Then You should be doing this four times(for each direction!) That'll just make it to where, if 2 seconds go by(calculated in my head... I may be wrong...) you'll just walk by the NPC or Player, so long as you're on a safe map. Now, if you can code, you should know how to do this remotly. Even better, you should make it to where this effect only works in towns and stuff. I'm not gonna show you guys how to do that because, well, I'm writing a Pokemon Game and it isn't necessary for my game. That wasn't too hard, now was it? I hope you guys can make good use of this code. Assholes, beware! - Robin - 12-03-2007 You can easily edit this to make a nice little walk by effect which will take you to the other side of the player/npc. Rather than just been able to stand on the person (from quickly reading the code I think that's what happens) - Coke - 12-03-2007 I think it would be cool if as you say push against someone/something for 2 seconds but if theres nothing behind them it pushes them/the npc 1 square in that direction... then i guess you could add an npc attribute, 'pushable (yes/no)'. Even better, right click the player/npc and it brings up a cute lil menu thing... Push North Push East Push west Push south or whatever, and if you cant push them in that direction its greyed out... getting carried away with my ideas, oh noes =P - Matt2 - 13-03-2007 Eh, my code was only the bases for what could be what you guys suggested. Robin, you're right. You can stand on them. xD Anyways, I helped the newbies, and the advanced peeps can do what they want with it. =O - Xlithan - 13-03-2007 Good idea Matt. I've seen the result of blocking on Pokemon, so this idea is a great addition. - Reece - 13-03-2007 It really is ![]() ![]() - Robin - 15-03-2007 Fox Wrote:I think it would be cool if as you say push against someone/something for 2 seconds but if theres nothing behind them it pushes them/the npc 1 square in that direction... then i guess you could add an npc attribute, 'pushable (yes/no)'. Or just make an npc move if they have someone pushing against them. like in ff and pokemon Re: Brush By - Matt2 - 11-12-2007 Edited to make it work only on certain map morals. Re: Brush By - Tony - 13-12-2007 Great job. |