How do I do doors

Get help using Construct 2

Post » Sat Jun 11, 2016 5:12 pm

Hi!
I got a small but complicated question.
I got doors working (can go from one layout to another)
Now my question and problem:

I'm trying to use a csv table to load the database for doors containing x & y position of the doorObj. Also info about ID, name, layout in which its placed, level etc.
I would like to use this info so I dont need to enter manually all of it each time the Player can use a door. bear in mind the PlayerObject can go to another layout and then comeback.

My idea would be to load a row of the csv table with the info.

I'm sure I wasn't even near to be clear lol Hopefully someone might be able to lead me in the right direction. Thanks!
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sat Jun 11, 2016 10:05 pm

hmm maybe add 3 instance variables to the doors one is ID and the other 2 for x.y then you can save the UID of the door you passed to the ID as the x.y
then fire events by using those variables

i hope it helps
Image
B
28
S
11
G
2
Posts: 139
Reputation: 3,299

Post » Sat Jun 11, 2016 10:18 pm

Thanks @Fidasx
I have doorID so I can set the idor each door independently. Also I store their xPos and Ypos. But what I would like to do is retrieve this info instead from a database.

So, when I press X to enter a door, it determines the door IDs and after obtaining it, it looks into a database to retrieve the proper xPox and Ypos so I can set them for the Player in the new layout.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sat Jun 11, 2016 10:53 pm

ahh ok you can use an array or a dictionary and save the values there after that save the values to the local storage object

there are also some plugins that let you save all your things to the an internet database search here in the plugin section
Image
B
28
S
11
G
2
Posts: 139
Reputation: 3,299


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests