| Mirage Source http://www.miragesource.net/forums/ |
|
| Brush By http://www.miragesource.net/forums/viewtopic.php?f=210&t=1500 |
Page 1 of 1 |
| Author: | Matt2 [ Mon Mar 12, 2007 11:41 pm ] |
| Post subject: | Brush By |
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 CanMove = False BrushBy = BrushBy + 1 Else If Map.Moral = MAP_MORAL_SAFE Then CanMove = True BrushBy = 0 Else BrushBy = 0 CanMove = False End If End If 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! |
|
| Author: | Robin [ Mon Mar 12, 2007 11:53 pm ] |
| Post subject: | |
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) |
|
| Author: | Coke [ Mon Mar 12, 2007 11:56 pm ] |
| Post subject: | |
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 |
|
| Author: | Matt2 [ Tue Mar 13, 2007 12:16 am ] |
| Post subject: | |
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 |
|
| Author: | Xlithan [ Tue Mar 13, 2007 11:09 am ] |
| Post subject: | |
Good idea Matt. I've seen the result of blocking on Pokemon, so this idea is a great addition. |
|
| Author: | Reece [ Tue Mar 13, 2007 2:08 pm ] |
| Post subject: | |
It really is |
|
| Author: | Robin [ Thu Mar 15, 2007 9:39 pm ] |
| Post subject: | |
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)'.
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 Or just make an npc move if they have someone pushing against them. like in ff and pokemon |
|
| Author: | Matt2 [ Tue Dec 11, 2007 11:27 pm ] |
| Post subject: | Re: Brush By |
Edited to make it work only on certain map morals. |
|
| Author: | Tony [ Thu Dec 13, 2007 2:38 am ] |
| Post subject: | Re: Brush By |
Great job. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|