Function Object Issue

For questions about using Classic.

Post » Fri May 20, 2011 7:30 am

So I was reading the wiki and it said if you call a function from an expression, it forgets picked objects. However, this doesn't seem to be the case. I have a function that picks objects , which calls another function via expression, and in that case, the objects picked by the first function remain picked when calling the second function via expression, and the value returned by the second function corresponds to the single object picked by the first function. If I instead call the second function using an action and specify Forget, and then use Function.Return to obtain the value in an expression, the value corresponding to going through ALL objects is returned.

Is this known? Any way around it? It seems a bit clunky to do an Add Param, call a function as an action, and then use Function.Return as opposed to the better looking Function.MyFunction(Param)
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Fri May 20, 2011 12:54 pm

Might want to upload a cap. There's just too many possibilities to try to reproduce what your talking about.
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Fri May 20, 2011 3:23 pm

I THINK this link should work:

[url:1ln9cgb7]http://sharesend.com/download/au3ii[/url:1ln9cgb7]

If not try http://sharesend.com/au3ii but this one has a 5 second countdown thing.

Check events 25 and 26. The way it's set up now it works, but what I had set up before was that event 25 had no actions, and event 26 had the expression Function.CheckSameMove(Param1,Param2), where Param1 and Param2 are the two params in 25. Doing it the other way would cause CheckSameMove to only loop through the already selected Unit (I think, in any case it didn't seem to work correctly)
B
11
S
2
G
3
Posts: 283
Reputation: 1,968


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests