I added new condition which is called WALKLOCK
I want to make it stop moving so i added inside game.cpp inside ReturnValue Game::internalMoveCreature
And its working when i dont put subid on it but right after i put subid on it its stops working i printed if i have the condition with subid in lua and its looking good but inside src the if is not going through
How i added the new condition
enums.h
luascript.cpp
condition.cpp
and then the game.cpp check
Can somebody tell me what am i doing wrong ?
Edit:
ah yea its tfs 1.3 always forgeting : /
I want to make it stop moving so i added inside game.cpp inside ReturnValue Game::internalMoveCreature
C++:
if (creature->hasCondition(CONDITION_WALKLOCK)) {
return RETURNVALUE_NOTPOSSIBLE;
}
And its working when i dont put subid on it but right after i put subid on it its stops working i printed if i have the condition with subid in lua and its looking good but inside src the if is not going through
How i added the new condition
enums.h
C++:
CONDITION_WALKLOCK = 1 << 28,
luascript.cpp
C++:
registerEnum(CONDITION_WALKLOCK)
condition.cpp
C++:
case CONDITION_WALKLOCK:
and then the game.cpp check
Can somebody tell me what am i doing wrong ?
Edit:
ah yea its tfs 1.3 always forgeting : /
Last edited: