How do I fix the pin problem ?

Get help using Construct 2

Post » Wed Oct 01, 2014 5:43 am

ah ok... sorry...I am a bit slow sometimes...I was hoping in a capx sample solution ...
B
38
S
16
G
2
Posts: 463
Reputation: 4,922

Post » Wed Oct 01, 2014 5:59 am

Nobody can help you with anything unless you have a core understanding on how to use [condition:pick instance]. After that, have a good look at container from the manual.


Thanks for this, I had read these early in my learning construct2 but didn't have a frame of reference to how they allow object instance independence till re-reading them just now.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
71
S
19
G
8
Posts: 640
Reputation: 9,701

Post » Wed Oct 01, 2014 7:12 am

thanks a lot....it was the container hat I needed :)
B
38
S
16
G
2
Posts: 463
Reputation: 4,922

Post » Wed Oct 01, 2014 8:33 am

Here's a different option. Without containers. I just got the tanks to spawn the turrets. Probably the same really.
You do not have the required permissions to view the files attached to this post.
B
12
S
1
Posts: 34
Reputation: 677

Post » Wed Oct 01, 2014 9:06 am

thanks a lot :)
B
38
S
16
G
2
Posts: 463
Reputation: 4,922

Post » Wed Oct 01, 2014 10:17 am

The only problem with having the object spawn the turret is if you later use something that just targets turret, it will affect all turrets in the layout. From what I can see in containers the container should keep this type issue from occurring because it treats the turret in it like a child object...

I noticed it in my object instances that later spawned their turrets (ie. they entered the scene then did a "set-up" phase where they erected their turret and began firing) all the instances turrets would stop shooting if one was hit by my electric stun for 5 seconds weapon.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
71
S
19
G
8
Posts: 640
Reputation: 9,701

Post » Wed Oct 01, 2014 10:40 am

chrisinfinger wrote:The only problem with having the object spawn the turret is if you later use something that just targets turret, it will affect all turrets in the layout. From what I can see in containers the container should keep this type issue from occurring because it treats the turret in it like a child object...

As I mentioned earlier, there 2 option, which is picking and container. What @megapowerskills did is the picking route which will allow a more versatile gameplay, the very reason why I mentioned it first before container. This way you can create a game mechanic that introduce partial damage, such as you can destroy only turret if only the turret is hit, while other weapon still intact. For container, the effective use of it is as a single objects with parts animated by event rather than animation frames, but if you want to use it just as a single object collision detector, container is the most effective way to do it.

chrisinfinger wrote:it will affect all turrets in the layout.

Learn picking, it is very important and the very core of most game.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Wed Oct 01, 2014 5:30 pm

Thanks DuckfaceNinja, I went back and dug deeper into picking and realized where I erred early on. I read the part of the manual where it says:

Events work by filtering specific instances that meet some conditions. The actions then run for those instances only. For example, consider the following event:

[A simple event. Bullet hits monster, kill bullet and monster.]


and missed the most important part later:

In other words, if an event doesn't reference an object in its conditions, actions apply to all the instances of that object.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
71
S
19
G
8
Posts: 640
Reputation: 9,701

Previous

Return to How do I....?

Who is online

Users browsing this forum: Ryan Kocourek and 24 guests