I tried your code. To be able to use I reduced it to
std::vector<int> thing; // I can't make this work using only std::vector with <int> included
thing.push_back(100);
auto seq1 = Sequence::create(
CallFuncN::create(CC_CALLBACK_0(HelloWorld::burning, this, thing)),
DelayTime::create(1.0f),
nullptr);
auto repeat1 = RepeatForever::create(seq1);
runAction(repeat1);
and
void HelloWorld::burning(std::vector<int> &monster_hp)
{
int hp = monster_hp.at(0);
hp -= 5;
monster_hp.at(0) = hp;
CCLOG("HP: %d", monster_hp.at(0));
}
This code started with the number 100 in monster_hp and each time the action repeated, it went down by 5. So I can’t see any problems with this code.
Are you sure you aren’t accidentally resetting the monster HP in code somewhere else?