Desperately trying to learn Construct, please respond......

For questions about using Classic.

Post » Tue Jun 08, 2010 1:15 pm

Hiya I came across Construct a week or so ago, and I'm desperately trying to figure it out. I'm a 3D Artist by profession, who would like to realize a game I had in my head for years, and I believe Construct can do that... I just need help to get my bearings.

Currently I found Lemmings .cap file here (thankfully) he's unfortunately non existent on the forums as of late, so I'm asking you. When I run the game and attack Gambit freezes, can someone with experience took a look to see what's happening? Would be very very appreciated.

[quote="Lemming":311facp4]
.cap: [url:311facp4]http://www.box.net/shared/k6ib90ez2q[/url:311facp4][/quote:311facp4]

I also found that you have to open any event with Player %1 and resave it for the animations to work.

Cheers...
B
4
S
1
G
2
Posts: 61
Reputation: 997

Post » Tue Jun 08, 2010 1:30 pm

Well, without even opening the cap file I can tell you it was made with a version of Construct over a year old.

It is very common for old cap files to not work correctly with the latest version (thus why you needed to open and re-save those events). Best option would be to try and take a look at newer cap files and learn from those.
B
2
S
2
G
4
Posts: 156
Reputation: 1,762

Post » Tue Jun 08, 2010 1:36 pm

Hiya thx for replying. What you're saying makes perfect sense, but this .cap file is a perfect base of what I'm trying to achieve, I've learnt quite a bit from it already, I just need help with the player freezing after attacking.

P.S. if you know of newer .caps that encompass player movement and combat like this, I would love a link! :)

Cheers,

~t
B
4
S
1
G
2
Posts: 61
Reputation: 997

Post » Tue Jun 08, 2010 2:17 pm

In the Animation Event Sheet, delete the actions that set the animation frames to 1. That's causing it to repeatedly play the first frame. I think on older versions you had to set it to frame 1. If something isn't working, you should break it down to little parts and figure out what works and what doesn't, even if it looks obvious that it should work. That makes it easier to fix bugs and such.

Edit: There seems to be something else causing him to freeze after attack. I think you need an event sending him back to idle and letting you move him. The events in the cap are kind of sloppy, but maybe i'm more used to working with states.

-Lou
B
77
S
49
G
25
Posts: 346
Reputation: 17,409

Post » Tue Jun 08, 2010 2:36 pm

Hmm, that didn't do it unfortunately, and I do appreciate your help Lou, trust me I'm working my way up to your file :)

Here's the updated .cap file I'm working from

[color=#FF4000:30cjp2d2][url:30cjp2d2]http://www.thecareergamer.com/web/Gambit.cap[/url:30cjp2d2][/color:30cjp2d2]

thx!

[Edit] So by using states, you would say check to see if a condition is being met, if not play the next animation? Or something like that[/Edit]

~t
B
4
S
1
G
2
Posts: 61
Reputation: 997

Post » Tue Jun 08, 2010 2:48 pm

Ah, sorry I read your first post wrong. When I first opened up the cap he was freezing before the attack, deleting the frame 1 thing worked and I had thought that was your problem.
B
77
S
49
G
25
Posts: 346
Reputation: 17,409

Post » Tue Jun 08, 2010 3:08 pm

Yeah, states are just easier to track. In the Gambit .cap, before you can walk you have to check to make sure each individual attack isn't playing. Using a state variable, you can set "state =attacking" for whatever attack and just check that state variable to see if he can walk or not. I'm not a programmer so I'm not sure that's the best way but it just makes things easier to read, for me at least. There are different ways to go about it.

In the gambit .cap I tried:

-Animation GambitStaff is finished
- Set Animation to GambitStand

And that worked for his staff attack, but not for his card attack for some reason.
B
77
S
49
G
25
Posts: 346
Reputation: 17,409

Post » Tue Jun 08, 2010 3:18 pm

Ok can you setup an example with states and send the .cap? So I can see how you would accomplished and then I can try it on my own.

Thx again for your help.

BTW I sent you an email through your site/blog

~t
B
4
S
1
G
2
Posts: 61
Reputation: 997

Post » Wed Jun 09, 2010 12:03 am

Ok so I manage to fix the prob (the update is in the cap just above) Construct is very logical for sure, but this solution appears sloppy to me, so I'll definitely look forward to your states/private variable example.

Ok so what I did was change the Equal to in event #10 to Greater or equal which allowed the card to spawn and shoot... then I just Set the animation back to GambitStand which got him moving again. This isn't elegant at all since the animation snaps to the standing animation. But hey I'm learning :)



~t
B
4
S
1
G
2
Posts: 61
Reputation: 997


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests