Creating new sprites?

New releases and general discussions.

Post » Wed Jun 24, 2009 8:00 am

Is it possible to create a new sprite object (Not spawn a new instance) using Events or Python?
B
2
G
3
Posts: 43
Reputation: 936

Post » Wed Jun 24, 2009 8:55 am

There are actions from "System" object (tab "Create"):
:arrow: Create object
:arrow: Create object at image point
:arrow: Create object by name
:arrow: Create object relative by object
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Wed Jun 24, 2009 1:23 pm

No, you can't create entire new object types in events, only instances. Since Python is simply an interface to existing events, it can't either (there are no magical superpowers in Python :P)
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,208

Post » Wed Jun 24, 2009 3:41 pm

Would that be doable with a custom plugin?

Example: If someone wanted to create a sprite for a imported image, something like a tilemap plug.
Image Image
B
161
S
48
G
89
Posts: 7,345
Reputation: 66,245

Post » Wed Jun 24, 2009 4:02 pm

What is wrong with simply using an universal Sprite object?
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Jun 24, 2009 4:18 pm

[quote="Mipey":1cf2fvvh]What is wrong with simply using an universal Sprite object?[/quote:1cf2fvvh]

You could set up animations on that, but it would be terribly contrived.
One thing you cant do with a single object is have different behaviors.
Then again you would need the ability to add behaviors during runtime as well.
Probably out of luck with bones tho....
Image Image
B
161
S
48
G
89
Posts: 7,345
Reputation: 66,245

Post » Wed Jun 24, 2009 6:36 pm

newt and I are on the same page/roadblock heh.
B
2
G
3
Posts: 43
Reputation: 936

Post » Wed Jun 24, 2009 6:57 pm

heh

Probably the best thing would be a sprite object exporter/ importer. Something that could export all settings for the sprite as well as all behaviors, including mesh's, bones, animations, etc.
Image Image
B
161
S
48
G
89
Posts: 7,345
Reputation: 66,245

Post » Wed Jun 24, 2009 11:01 pm

[quote="newt":1n3ucyat]Would that be doable with a custom plugin?[/quote:1n3ucyat]
No, there is no interface provided to plugins to do this, and the runtime doesn't support it. The SDK doesn't have the capability to fundamentally change the way the runtime works, it merely communicates.

Besides, if you could, how would you add events to the new object type? It couldn't possibly appear in the event sheet editor.
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,208

Post » Wed Jun 24, 2009 11:19 pm

[quote="Ashley":2mwgudva][quote="newt":2mwgudva]Would that be doable with a custom plugin?[/quote:2mwgudva]
No, there is no interface provided to plugins to do this, and the runtime doesn't support it. The SDK doesn't have the capability to fundamentally change the way the runtime works, it merely communicates.

Besides, if you could, how would you add events to the new object type? It couldn't possibly appear in the event sheet editor.[/quote:2mwgudva]

Yeah It would be a pain, then you'd probably have to implement a target object, and that pretty much makes the whole idea pointless.

Perhaps just a generic sprite importer/ exporter for layouts? :P
Image Image
B
161
S
48
G
89
Posts: 7,345
Reputation: 66,245

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests