Skip to content
#390
Auto-translated
antonag07
I don't know – I can only guess;

I tried recording this value: MarkObjectAsVisited(sObjectID, true);
where sObjectID is the script name of the object.
Yes, it gives an error that there is no hero '1' on the map. And I also tried setting the third parameter to true – I thought maybe there was an error in the manual. The effect is achieved anyway, but not for a specific hero.

Added 2 minutes later
KioM
There's something wrong with the loops; try disabling the object in a different way, for example, by naming all three stones differently: stone01, stone02, stone03, and then selecting them in the script:

stone = {'stone01', 'stone02', 'stone03'};
stone.n = length(stone);
...
for i=1, stone.n do
SetObjectEnabled (stone,nil);
Trigger (OBJECT_TOUCH_TRIGGER,stone,'up_herolider');
end;
...

This loop works perfectly fine – it has been tested many times. You are suggesting doing the same thing, but in a more verbose way. (And what if I have 1000 'stone' objects? ;) )

Statistics

Welcome our newest member: artem