Saturday, April 21, 2012

Floating Text and Cooldown Lag.

I need help with some of my triggers in my map.

Trigger 1 :

Floating Text

Ability Being Cast

Events

Unit - A unit Begins casting an ability

Conditions - (Ability being cast) Equals to (My Skill)

Actions

- Create floating text that reads (My Skill) above (Casting unit) with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 0.00%), and 0% transparency.

-Set (My_Skill_Text) = (My Skill)

-Change the lifespan of Ablility_Being_Cast to 3.00 seconds

---------------------------------------------------------------

But after a while this trigger makes me lag because i have more than 1 triggers like this with different variables.

I mean , if i have 2 skills,

Death Pact and Heal,

i will have 2 variables for them .. like -- Death_Pact_Text and Heal_Text

just to create a different (Last created floating text).

But it lags me.. is there another way?



Trigger 2 :

Some people who plays my map are bored with the cooldown systems that just refresh but no numbers and always want to know how long is it gonna take for the skills to cooldown.

so i make up a trigger that create a timer window if the skill is activated.

This is 1 of my trigger =

Event - A unit begins casting an ability

Conditions - (Ability being cast) Equals to (Ice Slash)

- Level of (Ability being cast) Equals to 1

Action -

If -

- Level of (Ability being cast) Equals to 1

Then -

-Start Ice_Slash_Timer as a One-shot timer that will expire in 20.00 seconds

-Create a Ice_Slash window for Ice_Slash_Timer with title Ice Slash in :

-Wait for 20.00 seconds <<< Real seconds.

-Destroy Ice_Slash.

Else -

-Do Nothing



If -

- Level of (Ability being cast) Equals to 2

Then -

-Start Ice_Slash_Timer as a One-shot timer that will expire in 15.00 seconds

-Create a Ice_Slash window for Ice_Slash_Timer with title Ice Slash in :

-Wait for 15.00 seconds <<< Real seconds.

-Destroy Ice_Slash.

Else -

-Do Nothing





------------------------------------------------------



But this 1 also makes me lag.. coz i have a lot of this..



is there any other way to reduce the lag?

Lag i mean at early game it doesnt lag, a few times casting the skill with the trigger it lags, a few times again the PC just stuck.

help?

No comments:

Post a Comment