Not logged inOpenClonk Forum
Up Topic Collection+Entry=ControlArea

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Newton
Yes, this is the interface which I imagined too. However, I'd replace int OCF with array Criteria in the fashion of FindObject.

The problem where Carli felt offended and left the discussion was the issue with the timer. Most findobject loops are NOT not called each and every frame - because of thoughts about speed. Now of course it is possible to add another parameter to the control zone. But I am still against this because with that we hide the real complexity from the developer so that he does not directly see anymore how expensive this really is. Additionally, he has less control over how will be searched - e.g. he always needs to specifiy a box and can not specify a maximum distance or a point.
And for what? For not having to write this
for(var obj = FindObjects(mycriteria)) { dosomething(obj); } in a timer call or effect
but this
AddControlZone(boxx, boxxy, boxwidth, boxheight, mycriteria, "dosomething", "dosomething_orperhapsnot");

The actual gain is in my opinion a very small or none.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill