I want this cog to end the level when the player enters a sector IF all the objectives are complete...it does nothing right now..whas wrong?
Code:
flags=0x240 symbols message entered sound goalsnd=Accomplish1.wav sector printsector int status=0 local thing player local end code entered: If(status==1) Return; If (GetGoalFlags(player,0)== 2) && (GetGoalFlags(player,1)== 2) && (GetGoalFlags(player,2)== 2) { PlaySoundThing(goalsnd, player, 1.0, -1, -1, 0); Sleep(1); SetGoalFlags(player, 3, 2); Print("Mission Objective Complete!"); Sleep(1); jkEndLevel; status=1; } Return; end
Save a tree, Kill a beaver!