![]() |
Equip Bonus System - 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: Equip Bonus System (/showthread.php?tid=1467) |
Equip Bonus System - Anthony - 19-12-2007 So I have been working on this equipment bonus thing for a couple hours and have it all figured out so it's working nicely however I think it is sort of messy. I am not sure. I was hoping to get somebodys advice on if there would be a faster way to do any of the things I am or not. As it is I have 6 Functions that are each like this: Code: Function GetPlayerWeaponBonus(ByVal Index As Long) Then I have this: Code: Function GetPlayerBonus(Index) So thats called whenever an item is equipped or unequipped and when you first join the game. Then obviously I have 5 declares like StrengthBonus, EnduranceBonus, etc. Those are sent in the SendStats sub so I can have my visual stats update like 8 + (1). So this seems slow, any faster ways? xD thanks! Re: Equip Bonus System - Rezeyu - 19-12-2007 Why are they functions if they aren't returning their own value? =/ GetPlayerWeaponBonus doesn't return a variable named GetPlayerWeaponBonus, so why isn't it just a sub? Re: Equip Bonus System - Anthony - 19-12-2007 Because I didn't know the difference... :oops: haha. I guess I should have looked into that a bit. Re: Equip Bonus System - Rezeyu - 19-12-2007 Why would negatives not work? Re: Equip Bonus System - Leighland - 29-12-2007 That's pretty close to what I did for my bonus system. Mines a bit sloppier though I think. This is what it looks like :p Code: Function GetPlayerBonusSTR(ByVal Index As Long) As Byte ' get players extra strength from items My item/inventory code was changed so the code isn't what it would be for a vanilla mse but you get the point. |