Doors

For questions about using Classic.

Post » Sat Jul 12, 2008 12:35 am

[size=85:341t44x6]Hi guys, i am pretty much new here. I found the name construct on a forum and i thought why not check it out. Looks like it's still pretty new.

Anyway, so i wanted to make an interactive adventure game. It was supposed to have semi isometric graphics. Not sure what it's called. Birdeye but from the front. But i ditched that since i am such a new and could not get the animation working properly.
[/size:341t44x6]

Now i am going for a topdown. Much easier. But i got stuck at making the doors.

I'd like to have sliding doors, but i can't figure out how to make the door slide. I can just change it's position but i'd like to have it animated. Same goes for hinged doors. I have no idea how to tackle this!

Any suggestions?
B
6
S
1
G
4
Posts: 66
Reputation: 1,532

Post » Sat Jul 12, 2008 8:56 am

Click on the door object in question, and find the Animator bar (should be a tab on the right). Right click the animation list (at the top) and select Add Animation. You will now have a new blank animation which you can add frames to (right click the frame area at the bottom and select Add Frame). To rename the animation, click on it, then see the properties in the property bar. Call it something like 'Open'. Be sure to click the Angle listed under Open and set it to not loop, if you want the door to stay open! Then in events you can change animation to 'Open', or 'Default' if it's closed.

If you have any further questions on this please ask :)
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Jul 12, 2008 9:39 am

I tried a couple times now, but it seems that construct sometimes doesn't know what sprite to use when i add a new animation and try to edit the frame.

I don't fully understand what you mean either. Do i need to make an animation of the door opening, or do i use the rotation?
B
6
S
1
G
4
Posts: 66
Reputation: 1,532

Post » Sat Jul 12, 2008 10:19 am

Oh, I thought you meant you wanted a sliding door. You'd do that with animations.

If you want a rotating door, then I've made an example here:

viewtopic.php?f=16&t=1241

This doesn't use animations, just a simple rotation. Remember that the hotspot of the door has to be your point of rotation, or it'll look funny.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Jul 12, 2008 11:06 am

That's what i was looking for. I didn't understand how you can add a change multiple times. I remember when i used game maker this was used for moving.

Anyway, thanks for the hinged door, but i wanted to know both.

Now, i noticed something. I could just change the counter rotation to [code:1441anzm]set Y to door .T -2[/code:1441anzm]
But that crashes with an error about an invalid texture.

Another question left. The first method for the slide door you suggested was using animation. Does that mean each frame has it's own pixel collision?
B
6
S
1
G
4
Posts: 66
Reputation: 1,532

Post » Sat Jul 12, 2008 11:14 am

Yes, each frame would have its own collision mask, so if the door was thin a character couldn't pass till it was fully open, for example.

If you wouldn't mind, could you post a .cap file of the crash? Hopefully it'll get fixed then.

Thanks
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Jul 12, 2008 11:40 am

B
6
S
1
G
4
Posts: 66
Reputation: 1,532

Post » Sat Jul 12, 2008 12:53 pm

Arg now i can't get either to work. the hinged door won't close as i want it to, and the sliding door crashes.

Your example is great, but it just snaps back.
B
6
S
1
G
4
Posts: 66
Reputation: 1,532


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests