| 02-22-2009, 07:17 PM | #1 |
This is what im asking, its not that important its just i want to know, if i have to many triggers will it make the game play lag? or it wont effect it if you have a fast computer? also im confused on the quest things, Do i need to use variables for that ? just simple questions |
| 02-22-2009, 07:24 PM | #2 | |
Quote:
1. Usually, for simple triggers, there won't be any lag, just try to avoid triggers that check something every "x" seconds and you're fine Events like this: are sure lag. XD 2. If you want a quest to be shown (or updated), you just need a simple trigger, example: Trigger: But obviously it depends on what you want to do, so I'll say "yes and no". Be more specific and you'll get a better answer |
| 02-22-2009, 08:05 PM | #3 |
It's totally circumstantial as to how much lag your triggers will generate: Firstly, they are handles, and increase the handle count - that's more memory that the game has to sustain per trigger. But honestly, triggers won't truly be the lag issue, unless obscene numbers are created - it's really the code they execute and how fast that code is. Periodic triggers aren't that bad really - especially with a high interval such as 1 second. You'll notice that many spells involve a global timer running constantly at a very low interval, which is essentially the same thing as a periodic trigger, as long as spells are being cast. Of course, if you create tons of those triggers at low intervals such as 0.02 sec, the processor will take a hit. Your second question is too vague for me to understand. EDIT: Think of it this way - a spell trigger most often registers EVERY TIME a spell gets cast, or a unit is attacked, and just look at damage detection - that's pretty heavy as it is. Something that runs a thread every second is probably equivalent to, if not more efficient than, a 1-second trigger |
| 02-22-2009, 08:17 PM | #4 | ||
Quote:
Quote:
Zerzax's right, but (personal experience) time-based triggers (mine was "every 1 second") with a huge code cause quite disturbing lags. Look at what Zerzax says and you'll be fine. |
| 02-22-2009, 09:30 PM | #5 |
Of course...when your triggers leak, they will cause lag no matter how many you have ... Depending on how good eachs computer is time until the lag starts may be different for each player ... |
| 02-22-2009, 11:19 PM | #6 |
Ah k thanks, just was wondering cause of having to many triggers will make it lag cause of all the things that would happen in my campaign map. |
| 02-23-2009, 12:32 AM | #7 |
Quests are created with triggers, they have their own section in the trigger editor drop down menu. Large amounts of units will cause lag before lots of triggers do. Memory leaks can be an issue, but only really if your map is full of them and play time lasts for a while. What the other guys said is true too- it depends on types of events and such you have. |
