| 05-22-2002, 12:42 AM | #1 |
I've opened a few maps and I see triggers that generally check to see if each player is there, and then a trigger for each player if they're there generating X number of guys. Now this can be done much simpler with variables. First, fill up a variable with the number of users. Next, when you specify how many guys you want to spawn, do this: Hit the Arithmatic button You'll see: Value + 1 Set the "value" to be the number of users variable. Make the sign multiplication. Change the 1 to how many bad guys you think 1 player could handle all by himself. Now when the guys spawn, it'll be What One Player Could Handle multiplied by the number of guys in the game. So if 4 people are in the game, and you think 5 guys in enough for one person to handle, 4*5 = 20 enemies. This spares you ALOT of extra trigger work. I suggest the maker of the 'genocidal' map do this ;) |
| 05-22-2002, 01:32 AM | #2 |
Edit: It'd be very hard to actually calculate the true number of players (since game player number includes people who quit people who never actually joined (nuetral victim) and computer players). The best I can think of is using 8 distinct variables with if slot status is playing then set variable x to 1 else set to x to 0...(X being player number) And finally have it playernumber=all 8 variables added together. Unforutnatly adding 9 variables bloats up size and just makes it more complicated. The map already uses last created unit type to make it only require 1 editing per copy also your way doesn't allow 8 seperate spawn spots. which my map suffers. In short your way is good for like a 1 way defense map my way is better for like an 8 way defense map. |
| 05-22-2002, 02:46 AM | #3 |
I'm not so sure. Actually, you may have to do individual triggers for Is Playing, but even then, if you have a variable that keeps track of current number, you could use this same technique. Knowing the number of users is useful period (for cinematic trick too). As it is, my advice still kind of applies. Mappers are still make individual triggers for each player to do the above, but then also adding an action in there each time with a compltely new number for how many enemies to spawn. Better to multiply it by number of players. Or if blizz would just fix it so getting acurate number is easy ;) |
| 05-22-2002, 01:42 PM | #4 |
Guest | lol dataangel truely EXTREME good new trigger wow lol sry but think thats not really a new idea .. thats a trigger you handel in 5 min and dont even think about it =) and to check how many players r in you dont need 8 var lol ok if you want to manage it this way y u dont just say if player1 is playing playernumber = playernumber + 1 .... but you can handle it with only 1 line integer A from 1 till 12 do if player[A] equal to is playing numUsers = numUsers + 1 else do nothing thats it and no you dont need 12 var |
| 05-22-2002, 07:20 PM | #5 |
AH you run into a problem as you probably want to keep this constantly running to make sure it doesn't add people who quit or lossed so if you have this on periodic event this will get to a ridiculusly high number (problem no?). And if you set it to zero before doing the action then if for the split second the game think its zero then your triggers may fuck up. In short if you really need to do the amount do it for interger a if player(a) slot status is equal to playing then do action. Check out my leaderboard triggers it just guesses the amount using the above trigger.. Also You really have no need to know the exact amount let the game figure it out on its own. |
| 05-22-2002, 07:34 PM | #6 |
Guest | you think just wrong .. if i need the amoung of players which r in game i use that trigger i dont use any event for it ... i just say run trigger checkhowmanyplayersrin ( =) ) so there is no prob at all .. your way is just not good .. what would you make if 120 users r in ... ok you can make it your way but its not a good way |
| 05-22-2002, 09:03 PM | #7 |
I see no real reason ever to need to know the exact amount of players, it can just be done imprumtu. Example where your thing fails. Lets make a madness type map; if the player isn't there it could keep spawning guys cuz you ussually have a dumb spawn trigger (make a guy at location every 1 sec.) Now you could run your trigger to check player number but why check player number (that'd be relatively pointless to check since you'd like to know if the player is there not how many there are? and if multiple triggers try accessing it bam (let say this is your reward trigger that gives beter gives if more people are playing after X&X amount of kills)...CRASH! To many parrallel uses of trigger. So my method is beter as an on the fly check if a players there and the true number of players (WhicH i still see no reason to need to know). Also have you opened my map? (aparently not) I do use If interger A player slot status most of the time expect when its a thing that has multiple spawns. Also I have founda way to reduce my boss triggers but that would add more if then elses. |
| 05-22-2002, 09:30 PM | #8 |
waedder, on the note of it fucking up if you set it to 0 before you do the calculation, there's a way around that. Say you have numUsers = 0, then the action. Yes that may fuck up, but what if you numUserstemp = 0, do calculation, put it into numUserstemp, then do numUsers = numUserstemp. This way numUsers never equals 0 and the triggers won't fuckup. You just need a temporary variable. Although, now that ya talk about specific players, yeah, that makes alot more sense since most of what you'll want you'll need to know which specific player is dropped. But for the purpose of player/enemy proportion I think this is still a good idea. Life what the hell are you talking about? I can't even tell what you're saying =P... how could 120 users be in when the max per game is 12? And I didn't propose a way of finding the number of users anyway =P What I was saying is most people are doing stuff like If there is 1 player spawn 5 enemies, if there are 2 players, spawn 10, if there are 3 players spawn 15, and so on, when you could just do numUsers * 5 in one trigger. |
| 05-22-2002, 11:13 PM | #9 |
Sorry Life's moronic babble confused me. as I said in my first STATEMENT YOUR WAY IS GOOD FOR SINGLE SPAWN SPOT LIKE A ONE-way DEFENSE MAP, MY WAY IS BETTER FOR A MULTIPLE SPAWN SPOT LIKE A 8-way Matrix D or something. Edit: If your a moderator that ussually means you should be semi-knowledgable on what your talking about, and your posts are "more important" ussually. Please do a spell check or grammar check before pasting any old slop out. I'm glad i'm not the only one confused by what the fuck life just said. |
| 05-23-2002, 12:23 PM | #10 |
Guest | sry but im a bit confused ... your first statement is ok ... if you want to know which player left your trigger is better ofcause .. but i thought you want to know how many players are in .. i showed you the way how to make it without 12 var ... ok thats it .. @dataangel with 120 players is just an example ... i know max is 12 player but you see if more people could player (like 120) the trigger would suck ... that show that my way is better :P your secound post i just dont understand weaaddar why do you post 2hours after your first post such shit (=)) .. if have no idea what difference it would make how to see how many players are in @1way spawn @8way spawn or @2000000way spawn =) your post makes no sense at all =) if you dont understand what i said ask what the hell that means .. thats ok ... but dont try to flame cause then ill use my moderator rights .. i dont want flames in this forum k? |
| 05-23-2002, 12:57 PM | #11 |
Guest | btw i dled your map and made the tread sticky cause i hate answering the same question over and over ... |
| 05-23-2002, 07:14 PM | #12 |
Hey as I said earlier can you please go over the gramatics of your post; Its just very hard to read what your trying to say it sounds very constipated, and almost sticatato Heres why your method is bad for an 12 way spawn lets just say. You could the total player number then decide which spawns to open, but...theres that nasty problem that since your doing this matrix d or tower D, if you open up the first 8 spawns of the 12 well since in matrix D your opening spawns that corepsond with the player who is there, if you start the first 8 but only 4 are the top 4 players and the other 4 are the bottom 4 players...Well you have this problem that nobody guards 4 spawns that are open and that the 4 players have nothing to defend. Also since your way uses only 1 trigger you can't possibly specify 8 or 12 or a 120 or 2000000 locations (since were you using your great numbers here) Since your saying you'll just multiply the amount of guys lets just use 5 here by 200000 fine one location is pumping out a ton of guy from one location but the other 19999999 are left idle. Also if you do count the number of players and have multiple spawns dependant on the number your actually doing more work then i am. WHAT WHY!? Lets you have life's briliant eventless trigger which in theory could work. Now you have your if then else systems to open up a spawn depending on the number. If its 12 then you open up 12 spawn locations, if its 2 only 2. Now that you look at it you realize you have more actions then i do! So you have your eventless trigger + the spawn trigger itself. You also have to have another action inside the spawn tirgger to call the eventless trigger. My way... It checks if a players there on the fly each time it needs to when related to multiple locations spawns. So its a if then else system only 12 of them. So mine has the spawn trigger itself. Clearly my way requires less work. Life, I think I just proved you never need to know the real amount of players in a map and if you absolutley must know its just easier my way. |
| 05-23-2002, 07:44 PM | #13 | |||
Guest | i dont want to spawn unit in 2000 regions or whatever ... your method to push the solutions to a totaly different problem is not bad but im not that dumb (ok my english suxx) ... ok ill show you what the problemn was and what the solutions was ok? PROBLEM: Quote:
that what YOU SELF said ok? =) YOUR SOLUTION Quote:
MY SOLUTION Quote:
ok now even you may see thats my solution of the problem is better ..your solution IS better for some other problems hope you can accept this .. if not you are just arrogant =) |
| 05-23-2002, 07:48 PM | #14 |
Guest | btw of you still want to discuss this non sense pm me and dont spawn this poor tread ;) |
| 05-23-2002, 08:14 PM | #15 |
as I said you want to KEEP THIS UP-TO-DATE ussually if you call it by another trigger then the number gets multipledx2 (which is bad) and if you have it as an always running event the number grows exponetially. |
