My imagepoints don't reflect object's orientations

Get help using Construct 2

Post » Wed Mar 19, 2014 7:07 pm

I'm having some trouble where an object is rotating/mirroring and flipping, but the imagepoint within that object is not moving with the object.

My enemy with a rocket launcher fires his rocket, but when he is mirrored, the rocket fires from the same imagepoint position, not with the mirror position.

https://www.dropbox.com/s/9n4071k1uv0e8 ... wrong.capx

You can look at my overly complicated code, I tried disabling some code until I narrowed it down to where I think the problem lies...

Either the armrocket>spawn code, or the system>create object code needs to be fixed.

This is probably an easy fix, but I can't seem to find it. Thanks for the help.
B
9
Posts: 18
Reputation: 361

Post » Wed Mar 19, 2014 9:07 pm

To be honest I have no idea why that is happening, makes no sense at all after the tests I've done.
Anyway I found a solution for it, a dirty one but works.
Check the modified capx, maybe that leads you to an answer, you can set the aim object to be invisible if you want to use it like that.
You do not have the required permissions to view the files attached to this post.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Wed Mar 19, 2014 9:49 pm

Here is a rewrite of your code. Maybe you will find something you like in there.
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Thu Mar 20, 2014 3:59 am

A big thank you to both of you!

caiorosisca, your aim code seemed to break out of the whole "spawning within a mirrored object" box I was programming myself into.

shirokuma, your trigger once and less than 200 distance simplified, and the destroy armrifle and spawn when already mirrored will help also.

I was creating variables for no reason, waiting for conditions and sub-conditions to be true counting on variables. Sometimes you just have to keep it simple as possible. Thanks again!
B
9
Posts: 18
Reputation: 361


Return to How do I....?

Who is online

Users browsing this forum: fearfulelephants and 22 guests