Reduce Lag

ianu74

New Member
Reaction score
8
Can anyone help me with this?
There's 2 spells causing major lag in my game,
And all the triggers affecting it are here.
BulletSpray
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Bullet Spray
Actions
For each (Integer A) from 1 to (3 x (Level of Bullet Spray for (Triggering unit))), do (Actions)
Loop - Actions
Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Attack Ground ((Target point of ability being cast) offset by (Random real number between 10.00 and 290.00) towards (Random angle) degrees)
Hells Arrow
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Hell's Arrow (Neutral Hostile 1)
Actions
Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add Shake (Neutral Hostile) to (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Orc Far Seer - Earthquake (Target point of ability being cast)
Basically these 2 spells are the ones causing a major lag for like 10 seconds when they are used more than once.(not all at once).
Is it a problem with the trigger?
 

vypur85

Hibernate
Reaction score
803
Code:
Hells Arrow
Events
  Map Initialisation
Conditions
Actions
  Unit - Create 1 Dummy Unit for Player 1 (Red) at Center of (Playable Map Area) facing Default building facing degrees
  Unit - Add Shake (Neutral Hostile) to (Last created unit)
  Unit - Remove (Last created unit)

The lag is caused by loading of dummy ability. You need to preload the abilities. Add the ability to a unit at map init then remove it immediately. For the first trigger, I believe the dummy has ability, that's why it causes lag when they are created for the first time. For the second trigger, just use the above trigger.

If lag still persist then I'm not sure what's the problem. The trigger seems fine to me (apart from being leaky).
 

THE_X

New Member
Reaction score
49
yea that trigger leaks a lil but not enuff to lag of what your decribing

but remove the leaks anyways.
 

FrozenShadow

I am a WolfieeifloW fan.
Reaction score
75
I used to have that mistake, like preloading the abilities, giving them to the unit before they even start the game, lol, a stupid me.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top