- Joined
- Nov 17, 2005
- Messages
- 165
As most of you experienced mappers out there already know, learning how to use JASS is probably the easiest way to optimize your map scripts and to reduce lagg. It's not too hard to learn the very basics, but it probably takes several years to really master. Therefore, I started this thread, where all of you can post some basic tips when it comes to lagg prevention and map script optimization. I'll start.
The first thing I learned was that temporary positions, for instance, are saved in the game memory unless you tell it not to. Let me show you an example. You may want to do this:
A second thing has to do with special effects. Instead of using:
The first thing I learned was that temporary positions, for instance, are saved in the game memory unless you tell it not to. Let me show you an example. You may want to do this:
- Item - Create MyItem at Position of (Triggering unit)
- Set MyTempPoint = (Position of (Triggering unit))
- Item - Create MyItem at MyTempPoint
- Custom script: call RemoveLocation( udg_MyTempPoint )
A second thing has to do with special effects. Instead of using:
- Special Effect - Create a special effect at MyTempPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl", udg_MyTempPoint))
Last edited: