[SUGESTION] set in events object properties to global yes/no

Get help using Construct 2

Post » Sat Apr 09, 2016 10:54 am

Hi, i dont do this before. Im looking for solution how do i set this in events
Image

For example if i pick up item in game this item is change position to slot
So when item is overlapping object slot, his 'global' should set to 'Yes'
but when i drop item his 'global ' should set to 'NO'

(When i change levels/layouts and when 'global' is 'yes' item is always on slot position and is when i change layout)
Last edited by delgado on Sat Apr 09, 2016 2:43 pm, edited 1 time in total.
B
111
S
28
G
48
Posts: 1,882
Reputation: 36,428

Post » Sat Apr 09, 2016 11:43 am

I am not an expert on game engine development but I can tell that your suggestion might be hard to implement. Also the memory management, It might make issues. But this is only a thought of mine.

But it will still be useful, +1.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,862

Post » Sat Apr 09, 2016 12:27 pm

@Ashley please read this thread and answer, its possible to add this to next relase?
B
111
S
28
G
48
Posts: 1,882
Reputation: 36,428

Post » Sat Apr 09, 2016 1:42 pm

Silly question.
Why not just not use global?
Image ImageImage
B
171
S
50
G
180
Posts: 8,396
Reputation: 113,986

Post » Sat Apr 09, 2016 1:43 pm

@newt how for example ?
B
111
S
28
G
48
Posts: 1,882
Reputation: 36,428

Post » Sat Apr 09, 2016 1:48 pm

Oddly enough, an array that is global.
Image ImageImage
B
171
S
50
G
180
Posts: 8,396
Reputation: 113,986

Post » Sat Apr 09, 2016 1:52 pm

@newt you give me hope, can you prepare capx example ??
B
111
S
28
G
48
Posts: 1,882
Reputation: 36,428

Post » Sat Apr 09, 2016 2:53 pm

Nope, it's pretty basic stuff.
On the start of the layout you check the global array for values.
You then create objects based on those values.
Image ImageImage
B
171
S
50
G
180
Posts: 8,396
Reputation: 113,986

Post » Sat Apr 09, 2016 4:31 pm

@newt I never use arrays... someone create inventory slots using arrays i do it this same using only events, thanks but will not use
B
111
S
28
G
48
Posts: 1,882
Reputation: 36,428

Post » Sat Apr 09, 2016 6:54 pm

I recommend using two objects, a non-global that is destroyed, and a sprite object in your inventory with multiple frames to represent what you picked up (which is global). Instead of moving an object, use variables (or again, arrays/dictionaries) to reference it.

Game design is like a magic show. Don't think so much about what is happening, but rather what appears to be happening. Think about many different ways to achieve the same goal, and pick the most efficient. In this way, you'll find there are always things you can do to improve your work and grow as a designer.

TLDR: Don't move the object, make the player feel like the object moved.
B
17
S
7
Posts: 21
Reputation: 1,711

Next

Return to How do I....?

Who is online

Users browsing this forum: OddConfection and 24 guests