Skip to main content
Inspiring
November 23, 2008
Question

add number to global variable?

  • November 23, 2008
  • 2 replies
  • 297 views
Hey there all,

just a quickie.

If I have

_global.gCost = 0;

on the main timeline

and then later on i want to increase gCost by a number (say 5), how do I do that, cause

_global.gCost +5;

doesn't work.

Thanks in advance.
This topic has been closed for replies.

2 replies

Inspiring
November 23, 2008
thx NedWebs

you're a champ
Ned Murphy
Legend
November 23, 2008
_global.gCost += 5;

which is a shorthand way of saying

_global.gCost = _global.gCost +5;