[Solved] How do I use "Factories" in C2? Can I?

Get help using Construct 2

Post » Thu Mar 12, 2015 5:14 pm

Just a simple instance factory? The code below never executes inside where I'm picking the arrow created by the factory call. If I move the "Add_Message" line up above to the Token pick, I can see the arrow UID is 201. So it is getting created. I've tried the arrowUID both static and not static.

Should this work or no?...

C2CreateInstanceExternalThenPickIt.PNG
You do not have the required permissions to view the files attached to this post.
Last edited by locohost on Thu Mar 12, 2015 5:55 pm, edited 1 time in total.
B
14
S
4
Posts: 297
Reputation: 1,637

Post » Thu Mar 12, 2015 5:31 pm

That depends on what the function "Missle_New_Arrow" does :)

Can you see in the object inspector, that arrowUID actually gets set ?

(you can pause the object inspector before stuff gets destroyed to check out their states in debugger preview mode)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Thu Mar 12, 2015 5:34 pm

Hi,
Have you tried using Pick All condition before the second Pick by UID?
B
14
S
4
G
2
Posts: 190
Reputation: 3,938

Post » Thu Mar 12, 2015 5:38 pm

beufreecasse wrote:Hi,
Have you tried using Pick All condition before the second Pick by UID?


I thought that with pick by UID it was not needed.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Thu Mar 12, 2015 5:47 pm

beufreecasse wrote:Hi,
Have you tried using Pick All condition before the second Pick by UID?


Yeah I tried that, but you don't need that if the sub is out at first level. It repicks from the full list.
B
14
S
4
Posts: 297
Reputation: 1,637

Post » Thu Mar 12, 2015 5:48 pm

lennaert wrote:
beufreecasse wrote:Hi,
Have you tried using Pick All condition before the second Pick by UID?


I thought that with pick by UID it was not needed.


If the sub condition is at first level you don't.
B
14
S
4
Posts: 297
Reputation: 1,637

Post » Thu Mar 12, 2015 5:50 pm

locohost wrote:
lennaert wrote:
beufreecasse wrote:Hi,
Have you tried using Pick All condition before the second Pick by UID?


I thought that with pick by UID it was not needed.


If the sub condition is at first level you don't.


Thanks, logical really :)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Thu Mar 12, 2015 5:52 pm

Uhhh, I've tried to post the solution to this thread two times now and my post is not appearing? What's happening?...
B
14
S
4
Posts: 297
Reputation: 1,637

Post » Thu Mar 12, 2015 5:53 pm

@lennaert Notice how you spelled Missle_New_Arrow wrong? Yeah so did I in the function name :cry:
B
14
S
4
Posts: 297
Reputation: 1,637

Post » Thu Mar 12, 2015 6:00 pm

locohost wrote:lennaert Notice how you spelled Missle_New_Arrow wrong? Yeah so did I in the function name :cry:



:lol:

If you use chrome, this could have shown up in the console: CTRL SHIFT J as an error about referencing a none existent function
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests