![]() |
My first step into Mirage - 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: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: My first step into Mirage (/showthread.php?tid=558) |
My first step into Mirage - Stomach Pulser - 31-12-2006 Hello, I have been browsing the forums the past few days, looking for interesting things. I found Magnus's tutorial on carrying over EXP after a player levels up. It is my first time coding in Mirage, so here goes (I re-made my levelup sub) Code: Sub CheckPlayerLevelUp(ByVal Index As Long) Is this good ![]() - Misunderstood - 31-12-2006 I think you could use a little less comments ![]() I'm not sure if the code works or not, did you test it? It works - Stomach Pulser - 31-12-2006 I tested the code and it works fine, giving me the EXP that I rightfully deserve. Thanks for feedback, I wanted to make sure it wouldn't totally screw up my game before I put it into action ![]() - grimsk8ter11 - 31-12-2006 Code: '**************************************************************** ther' we go - Stomach Pulser - 31-12-2006 Thanks! I got it indented in my source code now. - Tony - 31-12-2006 I hate commenting my code. Its annoying to see it :o But welcome! :: Pando - Robin - 31-12-2006 Pando Wrote:I hate commenting my code. Its annoying to see it :o But welcome! Good luck having a few people working on the same piece. - funkynut - 01-01-2007 I always make pattens with my comments, I hate seeing text that doesn't match the patten of the surrounding code (You know, how you sometimes have repeating if statements, or perhaps setting a group of variables or yada yada) - Misunderstood - 01-01-2007 funkynut Wrote:I always make pattens with my comments, I hate seeing text that doesn't match the patten of the surrounding code (You know, how you sometimes have repeating if statements, or perhaps setting a group of variables or yada yada) No, I guess I'm just not OCD like you ![]() - funkynut - 01-01-2007 pffft, ocd my butt, kinda hard to explain while I'm in the celebration state of mind. Basically, It just makes it easier on my eyes to look through my code - Stomach Pulser - 01-01-2007 OK, I implemented characters changing their direction without moving...but I have 2 questions for this. 1.) How can I implement key coding (i.e. Pressing alt + up arrow at same time) to have direction changes, because right now I just have a single key for each direction. 2.) When I am moving one direction, holding down the right arrow for say, if I also hold down my change direction key, after I start moving, My char will change directions for that split second during movement when you aren't moving. It will instantly change back after that second, so you will barely see the change, but it is noticeable. Any known fix, or will it simply be solved when I implement question 1? [EDIT] OK, on a different note, I found out how to increase the number of NPCs you can have on a map through experimenting and analyzing code! It is the first thing that I have implemented solely by me! I am starting to get the hang of things now! Happy new Year! - Obsidian - 01-01-2007 to my knowledge, alt can't be used. i tried to find a way to use it a while ago (although i didn't look very hard), and couldn't find one. - Stomach Pulser - 01-01-2007 Dave Wrote:You could use a low level keyboard hook to keep track of the state of the alt key... then if it's down when the arrow key is pressed...What is a low level keyboard hook? Anyways, alt was just an example. - Misunderstood - 01-01-2007 google it or look on pscode. It lets you capture key presses(even from other apps) and decide whether to pass them on or not. - Stomach Pulser - 02-01-2007 Would you have to use keyboard hooks to combine controls (i.e Ctrl + 4), or could you use a different methods. |