| 06-18-2008, 05:41 AM | #2 |
Hey dude, use the trigger tags instead of the code tags, it's easier to read. |
| 06-18-2008, 05:56 AM | #3 |
Hm...will do. I dont remember this forum having "Trigger" tags few years back. |
| 06-18-2008, 10:56 AM | #4 | |
Quote:
For example, we now generally use (v)Jass for systems like this, it's a lot more readable than the GUI triggers. |
| 06-18-2008, 02:44 PM | #5 |
I never really wanted to switch over to JASS, basically because I dont have all the time to learn it, and even if I did, triggering is just something I can do easily, and Ive done plenty. EDIT: I've never been into computer programming, so triggering to me is easier on the eyes. |
| 06-18-2008, 03:30 PM | #6 |
GUI systems don't work out because no one wants to add 10 triggers and global variables to their map for a simple system. I'll ignore that and just critique you're triggers directly: - *WHY* are you waiting 0.01 seconds everywhere? NONE of those waits are necessary. NONE. - Why are you using three separate triggers to create the dialogs? Just dump al that cruft in one trigger and separate it with a comment. - Why are you even using dialogs? They are incredibly intrusive. It only takes one person spamming menus to other players to ruin a game. - Your system can only handle one party. That seems a bit limiting considering what a 'party' is. - You don't list the variables the system needs. vJass + NewGen is superior to GUI in pretty much every way. You don't even need to memorize functions any more because it has auto-complete. |
| 06-18-2008, 04:12 PM | #7 |
During the Invitation, there IS a GUI action called "Convert Player Index to Player" or something like that... that would clean up the code a lot more. My memory of GUI is pretty limited, as I find any form of JASS simply far more efficient than GUI. Also, I don't understand the waits either, especially since 0.01 does not even register a wait. Isn't the minimum something like 0.1 seconds? (or was it 0.2?). 0.01 seconds to us is equivalent to 0. I think the average human can only notice a minimum difference of 100 - 200 milliseconds anyways. (0.1 - 0.2) Also I suggest taking all the "Pre-___" triggers (that.. cursed.. word).. and putting it altogether. Use Comment Action lines to split them up so it makes the code... *cough* actions more readable. Maybe I missed it but, what happens if i try to invite the same player twice even after he joined my party? There doesn't seem to be any conditions which stops me from doing so. It might also be nice to have a leaderboard / multiboard of some sort to be able to see whos in the party. Otherwise, have a command that lists who is in the party... e.g. "-listParty" or something like that. To make a multi party using GUI, i recommend an array of Parties (PlayerGroups / Forces), perhaps one for every player in the game. I'm basing this logic off these few principles: 1) A player can not be in more than one party 2) If a player is the leader of a party, that party is automatically the global variable "udg_Party[PlayerIdOfLeader]". 3) There is a maximum of parties = to the number of players in game. For example, you can't have 2 players and 10 parties. Then when inviting to a party, check if the player being invited is in a party. You can use a boolean array for that (one for each player), or do an annoying action which loops through each group and checks if the player is in it. Your choice. I don't like the latter approach. Then add the player to the inviting player (leader I assume...) 's Force variable (Player Group aka). The rest follows similar logic, except now: 1) When inviting, add player to leader's group element. Store the group number in a separate variable for that player. 2) When removing, look at the group number the players in to remove from udg_Party[groupNumber] 3) When impeaching, check to make sure the players in the group he is being voted to be removed from 4) When disbanding, check to make sure the person writing it has members in his or her group, before clearing it. etc There are more things you can do to improve it. I'm just skimming the basics. |
| 06-18-2008, 04:39 PM | #8 |
Yar, I have done lots of editing on it. Cleaned up a bit. And the reason why I used waits before was because when I made them all at once without waits, they tend to do nothing at all. And maybe that paranoia stayed with me for the few years. As for limits on invitations, I added another variable for it already. My reason for not being able to use JASS is this: I can only learn via hands-on experience, or someone showing it to me personally step-by-step and etc. I've read more than 5 different guides explaining how to use JASS for many different purposes, starting with Vex's, but I still couldn't comprehend it. Triggering was shown to me personally so thats that. And I don't believe anyone here is going to show JASS personally, so thats why I've been left in the dark. (None of my friends in RL can even mapedit, they cannot even use StarCraft's Editor) |
| 06-18-2008, 04:46 PM | #9 |
If you want to learn JASS efficiently, I suggest reading the manuals with the mentality that you know nothing about anything in mapedit whatsoever. Triggers, throw them out. Actions, events, everything. Start from scratch. I know that eventually some of these will return, since the concepts of events are still important, but start from scratch. Create a test map, and just write JASS. Not a whole lot of them, just little snippets and see what they do. This, is hands on experience. I knew that when I just reading JASS I thought it would be a little hard to get used to since I had GUI embedded deep in my head. But with a little bit of patience, JASS will grow on you. Download a JASS editor like JASSCraft and you'll soon start loving the freedom JASS can give you over GUI. I suggest reading the 7 lessons that were written so far here: http://www.wc3campaigns.net/showthread.php?t=90030 and Blade's: http://www.wc3campaigns.net/showthread.php?t=83337 These two I found to be one of the most well laid out guides for JASS due to their step-by-step / examples given. If you follow with it you'll be impressed by how quickly you can get the hang of JASS coding. Although having a programming background can accelerate your learning speed by a lot, I don't find that necessary for JASS. Its nowhere as complicated as C++ or Java, and it usually just requires a little knowledge of warcraft III mechanics itself. |
| 06-18-2008, 06:09 PM | #10 |
I don't get why people try to make party systems when the maps are limited to 12 players anyways... |
| 06-18-2008, 06:17 PM | #11 |
Easiest way to learn JASS after being a GUI user: Make GUI triggers. Relatively small ones. Convert to JASS and clean them up (locals, fix leaks, remove BJ functions, etc.) You will begin to learn key functions and the syntax of JASS while improving your map at the same time. Refer to the 7-lesson guide that I helped with for more on JASS. It's very simple and it breaks down well rather than just slamming everything about JASS at you like Vex's (sorry) and a few others do. 7 lessons breaks up the basics of JASS for you. But really, take my advice on that. It's how I learned. Take your GUI and make it JASS. Clean it. Not only will the map run better (since JASS > GUI x1000), you'll learn JASS as you go. PS: Get JASScraft. It will be your new teacher. Until you worry about vJASS (don't.), JASScraft will get you very far. |
| 06-18-2008, 06:45 PM | #12 | |
Quote:
My map "A Hunter's Life for Me!" requires the party system so that if a party leader has a contract (a quest bought from a Contractor), they can add people to join in and share the reward (which will be split among the players). Also, hunting missions such as "Assassinations" or hunting "Blacklisted Hunters" are really rare contracts that appear in the shop one out of every several thousand chances and people may want to share some of the rare loot. I based my map off of "Monster Hunter" and "Hunter x Hunter" series. Now a sidenote: Whats vJass? searched but didnt find a specific topic. |
| 06-18-2008, 06:48 PM | #13 |
vJASS is the new, hip form of JASS. It basically turns it into a pseudo-real-coding language. Adds lots of functionality, replaces outdated stuff, adds overcomplication... you get the idea. Don't worry about vJASS until you have a good handle on basic JASS. At the very least, get JassNewGenPack (if you don't have it already) before you start JASSing, you else you'll be crashing all over the place. |
| 06-20-2008, 12:06 PM | #14 | |
Quote:
|
| 06-20-2008, 07:40 PM | #15 |
It's actually closer to .21, I think. |
