LoS and n of angles

For questions about using Classic.

Post » Thu Mar 05, 2015 11:01 pm

Message: eku can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Two quick question.

1. Why LoS behavior don't work with my settings? I only have few solid objects, but still - with obstacles set to solids or custom, my platforms - objects with LoS behave like they in sea of solids objects, they blind.

2. I don't know how to "lock" animation angles. I mean graphic vise is ok, my "ene1" sprite set angle toward "gracz" sprite without rotating (well, is humanoid that stand on the ground), but my "ene1" spawn some objects on frame 15 and one of them have bullet behavior - "ene1pocisk" (bullet) don't travel with straight line, just like original spawn point ("ene1" sprite) is still rotating. I don't know what to do. I tried almost everything I can imagine, but still with no luck, so... how to "lock" angles to "left" and "right"? Everything about "ene1" is in "ene1" group.
Here is quite big .cap and little NSFW - https://dl.dropboxusercontent.com/u/16947862/hd.cap
B
5
S
1
Posts: 37
Reputation: 576

Post » Fri Mar 13, 2015 1:22 pm

For the love of pixels - help me ;)
B
5
S
1
Posts: 37
Reputation: 576

Post » Sat Mar 14, 2015 9:13 am

So, just to clarify, when "ene1" fires a "ene1pocisk" (which has the bullet behavior) you want this "ene1pocisk" to travel horizontally (in a straight line) from it's starting position?

I have your project open, it looks awesome by the way, so I'll try help if I can. It's been quite a while since I used CC, but I have a soft spot for it so I decided to get it working again.

Also, regarding your first question, which object is using the LOS behavior? What are you using the LOS behavior to do?
B
17
S
2
Posts: 66
Reputation: 1,382

Post » Sat Mar 14, 2015 4:16 pm

Message: eku can only post plain text URLS until they have 500 rep. 3 URLS modified. Why?
I will upload newest .cap because I messed stuff pretty badly. MagicCam in not very friendly plugin. Or I'm just stupid.

And yes, I think what straight line for bullets is better for evading them on something like stage 1,2,3, but I simply can't do that.

So, "gracz" (is player) has LoS, and there is test, hm, vase on second platform. When obstacle is set to "custom" (so, none obstacles) the particle above vase spawn particles, but when I put collision set to "solid" nothing happens. Same for ene1, he actually have LoS behavior (when it see player it start shooting) and its working when obstacles set to custom, but when "solids" is selected... you know, don't work.

Give me a hour and I upload "newest" .cap. Even bigger mess ;-)

And thanks!


edit:
Here is stuff:

- cap file
http://tinyurl.com/n6pv9bd
dl.dropboxusercontent.com/u/16947862/gamelike.cap

- my plugins and effects folder for compatibility sake
http://tinyurl.com/odbtem5
dl.dropboxusercontent.com/u/16947862/CCEffects_and_plugins.7z

- data folder with audio if you wanna see/ hear full power (place data folder in same directory as .cap)
http://tinyurl.com/qfspy2l
dl.dropboxusercontent.com/u/16947862/data.7z


Like I said before. Ene1 is broken, LoS for Ene1 and gracz is broken ( ene2 use system by other guy from CC forum, its use "distance" expression, dunno about it...but it looks like is something like LoS, almost) and there is other things, maybe simple to fix, maybe not, dunno.

1. When you press Z, ggracz (its graphic for gracz) play animation szut. Long story short: sometimes randomly system spawn two attacks from animation. Totally dunno why. Everything about movement is in group "ruchy", and attack itself is in group "atak1". Actually is quit cool that sometimes you spawn two attacks (for cost of two attacks unfortunately ) but I don't like when something just happens without any control over it. Can you help me with that? With audio files you can ever here two thunders....

2. Now I have very, very basic life system. When last life is gone, system goes to another layout with "you died" graphics and when you press something it should go back to layout with game (well, is mostly test level, but...), but when system go back to layout with game everything is black for time that player will lost one life. I don't know is this a Magicam fault or my stupidity. Can you help with that too?


edit2
Crap, I can't post links :/ Try tiny URL.
B
5
S
1
Posts: 37
Reputation: 576

Post » Mon Apr 13, 2015 5:19 am

I didn't get a chance to check out your cap file yet, but if you want another method of line-of-sight that works a bit faster try this out: https://dl.dropboxusercontent.com/u/471 ... tomLOS.cap

As for locking rotation angle, just do this formula:

angle = floor(angle / division) * division

eg: Sprite.Angle = floor(Sprite.Angle / 45) * 45

That should always rotate to the lowest (eg: 46 is rounded down to 45, and 89 is rounded down to 45) 45 degree angle (so 0, 45, 90, etc)
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests