How do I overcome turret rotation?

Get help using Construct 2

Post » Tue Aug 04, 2015 9:13 pm

So I know there's no way in C2 to make rotation to false and make the turret work. It won't shoot if you do that.

So I figured I would make it rotate and make it invisible and place on top of it the actual tower/turret artwork. But my problems don't end here.

Now that I have finished my artwork I set an imagepoint on the turret object and place the "turret overlay" on top of it. Now the problem is I can't figure out a shape and a way for the actual turret object to shoot from the same point. Even if you set an imagepoint to spawn an object from that point, the rotation will make the object spawn from different places, therefore it won't paste correctly on my overlay.

So how can I actually make it work?

Thanks!
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Tue Aug 04, 2015 9:51 pm

A screenshot might help, but this sounds more suited to a bullet object. Whenever you want, create it at your position and angle it towards the player in the same event.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Tue Aug 04, 2015 10:32 pm

I have the bullet set to spawn at the imagepoint in the turret object. So I need a static "shotting position" if you will. I'm not quite sure what you mean, seems that would overcomplicate things; if I could get the static point that would do it.

Image
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Tue Aug 04, 2015 10:48 pm

I was saying to cut out the turret behavior altogether since you have different visuals anyways. Just create a bullet at that specific image point on the visual element. If you don't know how to use image points, check it out in the manual.

Try spawning your bullets at image point 0 of your object, though, if you insist on using it. Hopefully you haven't moved that so it should be right in the center.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Wed Aug 05, 2015 12:00 am

Okay, I made a quick and dirty version really quickly. There are a few things I did that are easily expandable to make your game more convenient to make later. Check out the container under "base" for instance. I didn't use the turret behavior since it wasn't necessary. It was just as easy to omit it and do it through events. I also visually added (an ugly) boundary so you can see where the turrets are activated. It's all run off of the mouse position, but it's just as easy to handle it with other objects. You can (and should) set the boundaries based off of variables that you control with your objects in-game, but that wasn't necessary for such a simple example.

Check it out

It's made in r210 of C2 I think.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Wed Aug 05, 2015 8:41 am

Any chance you could save it in an earlier version, I don't have the beta r10 installed.
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Wed Aug 05, 2015 12:49 pm

No. I actually thought about saying in the other post I wasn't willing to downgrade :-P It's easier for you to just spend 45 seconds getting the update at the bottom of the page. I promise the beta release isn't scary or weird.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996


Return to How do I....?

Who is online

Users browsing this forum: Construct Monkey, shawnzien, tatogame and 8 guests