[Suggestion]More expression fields for "Create" actions

Discussion and feedback on Construct 2

Post » Fri May 02, 2014 12:04 pm

Hello,

I would like to suggest having more expression fields for "Create" and "Spawn" object. Atm I'm trying to set parameters to newly spawned object from clicking on the same type of object, but parameters I'm trying to set are being applied to first object and not the newly spawned one. If we could have more parameters for those actions, we could set the object from json, or set size, angle, animation frame etc. within them, and without the headaches.

Cheers
M
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
86
S
28
G
21
Posts: 1,981
Reputation: 19,316

Post » Fri May 02, 2014 12:41 pm

Have you tried setting the parameters when using the "On Created" event?

That should work like a "Constructor" and apply to only the freshly created object.

If you're using some system objects or functions and not re-picking though, I could see that potentially causing some issues.
"In truth we live, In Truth we die"
B
11
S
3
G
4
Posts: 22
Reputation: 3,177

Post » Fri May 02, 2014 1:15 pm

Xerullian wrote:Have you tried setting the parameters when using the "On Created" event?

That should work like a "Constructor" and apply to only the freshly created object.

If you're using some system objects or functions and not re-picking though, I could see that potentially causing some issues.


Hmm. I missed that one! Thanks for pointing that out. >.>
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
86
S
28
G
21
Posts: 1,981
Reputation: 19,316

Post » Fri May 02, 2014 3:14 pm

megatronx wrote:
Xerullian wrote:Have you tried setting the parameters when using the "On Created" event?

That should work like a "Constructor" and apply to only the freshly created object.

If you're using some system objects or functions and not re-picking though, I could see that potentially causing some issues.


Hmm. I missed that one! Thanks for pointing that out. >.>


you can also add the events just under the creation itself, it should work
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Fri May 02, 2014 3:17 pm

Aphrodite wrote:
megatronx wrote:
Xerullian wrote:Have you tried setting the parameters when using the "On Created" event?

That should work like a "Constructor" and apply to only the freshly created object.

If you're using some system objects or functions and not re-picking though, I could see that potentially causing some issues.


Hmm. I missed that one! Thanks for pointing that out. >.>


you can also add the events just under the creation itself, it should work


This unfortunately didn't work.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
86
S
28
G
21
Posts: 1,981
Reputation: 19,316

Post » Fri May 02, 2014 3:27 pm

Just out of curiosity what parameters are you trying to apply to the new objects? I'm using some thing similar for my "auto-scrolling" game in which I'm creating a bunch of objects(of the same type) applying an animation frame randomly and dealing with the results properly in the game logic.
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,781

Post » Fri May 02, 2014 3:33 pm

Ragevortex wrote:Just out of curiosity what parameters are you trying to apply to the new objects? I'm using some thing similar for my "auto-scrolling" game in which I'm creating a bunch of objects(of the same type) applying an animation frame randomly and dealing with the results properly in the game logic.


I'm trying to duplicate object as Copy/paste. Using "on created" did work thought.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
86
S
28
G
21
Posts: 1,981
Reputation: 19,316

Post » Fri May 02, 2014 3:40 pm

You do realize that spawn means use the parents parameters?
Image ImageImage
B
168
S
50
G
164
Posts: 8,239
Reputation: 105,597

Post » Fri May 02, 2014 3:45 pm

newt wrote:You do realize that spawn means use the parents parameters?


My goal is to exactly duplicate the object, with it's size, angle etc. For that, i'm storing it as json. Otherwise, the object spawned is not a carbon copy.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
86
S
28
G
21
Posts: 1,981
Reputation: 19,316

Post » Fri May 02, 2014 3:51 pm

Setting up the parameters of an object in the same event in which it's created definitely does work, but you have to be in exactly the same event or a sub-event. If you're trying to do it in a parallel event (if the creation and parameter defining actions are both separate sub-events of another event), then Construct will reset the picking and default to all instances of the object. Picking is always reset as soon as you step up and out of an event.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Garrey, Yahoo [Bot] and 1 guest