how would i add instead of change or copy

Get help using Construct 2

Post » Tue Jan 05, 2016 3:37 pm

i want to be able to add variables and objects
i know it is possible to add instances and change variables but this is not what i want to achieve
i want to add or delete a variable while the game is running
i want to create a new sprite while the game is running

FYI i have knowledge/experience with javascript
B
7
Posts: 9
Reputation: 271

Post » Tue Jan 05, 2016 5:52 pm

Hello,

You can add object in game using the System action "Create Object" or the Object action "Spawn Object". For an object to be spawn, an instance of this object type must already be in one of the layouts before, like objects on the side offscreen or in a loader layout.

You can't add instance variables in game, but you can attach an array or dictionary and keep the UID in an instance variable to store and manage variables in game.

Hope it helps
B
14
S
4
Posts: 109
Reputation: 1,281

Post » Tue Jan 05, 2016 5:55 pm

I think he means creating a new object (not instance) in runtime, this is not possible as a native function and as far as I know there is no 3rd party plugin that does that, I've looked into it before.
Image
B
67
S
26
G
12
Posts: 511
Reputation: 11,974

Post » Tue Jan 05, 2016 6:19 pm

Thank You for the information
I Will try to make them variabel thing work
Maybe i can create such a plugin
I hope i can
I Will loser my internet connecties in a couple of second so i can not respond quickly
B
7
Posts: 9
Reputation: 271


Return to How do I....?

Who is online

Users browsing this forum: PreacH and 11 guests