Jump to content

Photo

which is the faster?

global variable

  • Please log in to reply
1 reply to this topic

#1
shavkacagarikia

shavkacagarikia

    Old Hand

  • Premium Member
  • 1,088 posts

Hello, I want to get many global variables for check and then do some stuff. So I was wondering which way is faster, to get the values by if condition in script itself, or to add a spell to player which already has that condition checks and then remove it when not needed.



#2
BigAndFlabby

BigAndFlabby

    Faithful poster

  • Premium Member
  • 1,907 posts

This would be hard to say unless you had access to the source code of the engine to see how efficient it was at matching up conditions on spell effects. Ultimately I would think that the spell matching would be faster than a stack of if statements. Though depending on how many we're actually talking about, and how often it triggers to check, it might be easier to just do it in the script. It would give you a lot more direct flexibility in the logic.







Also tagged with one or more of these keywords: global variable

IPB skins by Skinbox
Page loaded in: 1.006 seconds