Senior Member
Join Date: Feb 2010
Posts: 874
|
By the way, before I forget, I'd like to thank you again, Zarlor; doing this project has taught me a lot about both using the editor in HL in general, and specifically for SW, and I doubt I'd have been able to get where I am with it without your help. Much, much appreciated. I suspect I'll find any successive projects I do incredibly easier because of your patience with me here.
|
#31 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
Quote:
Code:
foreach pick in hero from WeapRange if (eachpick.tagis[WeaponType.ModPistol] | eachpick.tagis[WeaponType.FutPistol] <> 0) then eachpick.field[wpDmgBonus].value += 2 endif nexteach Quote:
Lenny Zimmermann Metairie, LA, USA Data files authored (please let me know if you see any issues with any of these if you have/use them): Official (In the downloader) 50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome Coming Eventually Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me) |
||
#32 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
Quote:
Quote:
|
||
#33 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
Just a couple of tips. You can put your code into those boxes like I used by putting putting [ CODE ] (no spaces between the brackets and the word) and [ /CODE ] at the end (again, remove the spaces.) Also you'll note how I indented things? Obviously it works perfectly well without any indentation, but for readability it's kind of an old coder trick to indent stuff so it lines up with the earlier things it references. In the example above I've got the foreach starting at the beginning of the line, but since the "if" statment happens inside of the foreach loop I normally indent it. Same with the "eachpick" line since it's only doing something based on the "if" line before it. Then the endif, since it relates to that earlier "if" line is placed at the same amount of indentation as the "if" it belongs to and the same for that nexteach line. Not a big deal at all with something relatively short like that, but if you ever have to start nesting if statements inside of each other it can be easy to lose track of which endif goes with which if so indenting like that tends to help some. Thanks for sharing your findings!
Lenny Zimmermann Metairie, LA, USA Data files authored (please let me know if you see any issues with any of these if you have/use them): Official (In the downloader) 50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome Coming Eventually Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me) |
#34 |
|
|