Spaceblow
2014-08-16 13:19:30
So I'm adjusting a procedure by adding a failsafe. The player has to run to the redberry bushes, if it somehow ends up in another place while it should be at the redberry bushes, the script will terminate. I did this by checking for an altar and a tree symbol in the minimap. If it returns true it will go to the next procedure, if not then it will terminate the script.
This is the minimap when I'm at the redberry bushes place so you would know what symbols I'm talking about:
[ATTACH=CONFIG]23806[/ATTACH]
You can see both the symbols (altar symbol and tree symbol) are on the minimap, so normally it has to start the next procedure, I did the following:
So if it finds altar symbol and tree symbol it goes to the next procedure, otherwise it terminates. But for me it doesn't do that, it does the opposite thing, it terminates the script. After a few minutes of trying to figure out what's wrong I tried this:
And it works! But why? Now it's saying 'if I don't find altar symbol and tree symbol I'll continue, otherwise terminate if I find those symbols', but it does the opposite thing, it doesn't make any sense?
This is the minimap when I'm at the redberry bushes place so you would know what symbols I'm talking about:
[ATTACH=CONFIG]23806[/ATTACH]
You can see both the symbols (altar symbol and tree symbol) are on the minimap, so normally it has to start the next procedure, I did the following:
if (minimap.findSymbol(altarSymbol, MM_SYMBOL_ALTAR, minimap.getBounds()) and minimap.findSymbol(treeSymbol, MM_SYMBOL_TREE, minimap.getBounds())) then
begin
writeLn('--------------------------------------------------------------------------- We found the redberry bushes.');
end else
begin
writeLn('--------------------------------------------------------------------------- We somehow didn''t find the redberry bushes, maybe you''re at the wrong location, terminating script.');
terminateScript;
end; So if it finds altar symbol and tree symbol it goes to the next procedure, otherwise it terminates. But for me it doesn't do that, it does the opposite thing, it terminates the script. After a few minutes of trying to figure out what's wrong I tried this:
if not (minimap.findSymbol(altarSymbol, MM_SYMBOL_ALTAR, minimap.getBounds()) and minimap.findSymbol(treeSymbol, MM_SYMBOL_TREE, minimap.getBounds())) then
begin
writeLn('--------------------------------------------------------------------------- We found the redberry bushes.');
end else
begin
writeLn('--------------------------------------------------------------------------- We somehow didn''t find the redberry bushes, maybe you''re at the wrong location, terminating script.');
terminateScript;
end; And it works! But why? Now it's saying 'if I don't find altar symbol and tree symbol I'll continue, otherwise terminate if I find those symbols', but it does the opposite thing, it doesn't make any sense?