Super Bugfix Roundup Deluxe!

Discussion and feedback on Construct 2

Post » Thu May 11, 2017 7:25 am

Take a piece of paper. And a meter.
Now lerp it like you do.

Measure and cut of 20% of the length. (distance gets shorter) and keep doing so until the end of days.
What happens in the end ?

Add a distance check to the lerping. When the distance-to-go is less then (lets say) 4 pixels, dont lerp.
B
33
S
18
G
27
Posts: 2,431
Reputation: 20,326

Post » Thu May 11, 2017 9:35 am

@Ricethin

For #2, try this to simplify things:

Give EmotionIndicator the Pin Behaviour

Conditions
Cursor is over Customers
Trigger Once

Actions
Customers: Spawn object EmotionIndicator at image point 2
EmotionIndicator: Pin to Customers (position only)
EmotionIndicator: Set animation to frame (Frustration < Customers.FrustrationThreshold*0.25 ? 0 : Frustration < Customers.FrustrationThreshold*0.75 ? 1 : 2)
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
32
S
9
G
7
Posts: 444
Reputation: 6,731

Post » Fri May 12, 2017 1:44 am

ACK! @OddConfection that worked PERFECTLY!

I have a few more that I'd love help with.

#4 - There doesn't seem to be a way to click on an object, then clone that exact object that I clicked on elsewhere.
Like... ON CLICKED ON OBJECT -> Create object OBJECT YOU CLICKED ON on layer XYZ. In context, I'm trying to click on the little dude in the hoodie and have him appear, as a clone, where the little girl in the purple dress sits. Ideas?

Image


#5 - Pathfinding animation changes..
I use "is pathfinding walking along path" to make people animate, but it.. works strangely. Particularly, characters seem to pause for a second during multiple pathfinding calls, which seems to look weird. This only occurs on a chain of find path -> move along path -> on arrived -> find path, repeat

Observe:
Image
Image
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Fri May 12, 2017 11:20 am

Ricethin wrote:#4 - There doesn't seem to be a way to click on an object, then clone that exact object that I clicked on elsewhere.
Like... ON CLICKED ON OBJECT -> Create object OBJECT YOU CLICKED ON on layer XYZ. In context, I'm trying to click on the little dude in the hoodie and have him appear, as a clone, where the little girl in the purple dress sits. Ideas?


I don't think there is an easy way to detect object type and do that in one action (although maybe in C3 since that has Create by Name)

Assuming you have all people in a Family (called People or something), add an instance variable to it called Type and set that for each person, e.g. Type=Hoodie

Then do:
Event
On People clicked

Sub-Events
People.Type = Hoodie -> Create Hoodie on XYZ

Else
People.Type = PurpleDress -> Create PurpleDress on XYZ

Else
etc.
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
32
S
9
G
7
Posts: 444
Reputation: 6,731

Post » Sat May 13, 2017 3:12 pm

Oh! That's clever. I will add an instance variable, name them, and do it that way with a branching select.

Thanks for your help!

Any idea on the pause during pathfinding? It's cosmetic, so not a showstopper, but yea.

Cheers!
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Sat May 13, 2017 8:08 pm

Ricethin wrote:Any idea on the pause during pathfinding? It's cosmetic, so not a showstopper, but yea.


Pathfinding is one of the more intensive operations in coding, so calculating a path can take a few ticks.

The path in your example image doesn't look particularly long, so instead of breaking it up into multiple chained paths you could do just one pathfinding call and only have the pause at the start.
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
32
S
9
G
7
Posts: 444
Reputation: 6,731

Post » Sat May 13, 2017 11:46 pm

Another one...

Why doesn't this work?
I want the customers BEHIND the furniture when it's facing up, and in FRONT of it when it's facing any other direction.

It kinda just freaks out right now.

Image
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Tue May 16, 2017 10:39 pm

I assume that you have some Seating with direction=1, some with 2 and some with 4. (read this twice, because it is as simple as that)

You read the conditions wrong.
Look at event 424. It does not state 'IF seating.direction = 1 THEN do those actions".
It states: 'Make a picklist containing all the seating with seating.direction = 1', apply the actions on the picked seating, or do not run the actions at all when the condition is not true (in the case of picking, the condition is untrue when the constructed picklist is empty)

Construct is mainly about picking.

'Or' is a logical thing. It does not work work as you expect it to work with picking items. (read the first line again). Use it only if you intend to use only the logical part of the conditions. (until you understand picking)

Else is a a logical thing. It runs when its parent condition did not run (is untrue). So when there is at least 1 seating with seating.Direction = 1, the else will just not run.

All together now. Why is this totally weird construction not working ?

Event 423.
Make a picklist that contains all customers that overlap any seating, plus containing all the Seating that overlap any customer. De picklist now contains some customers and some Seating.
For all following sub events, this is the picklist where they start picking from (their previous picked list).

Event 424
Pick from the previous picked list those Seating with Seating.Direction = 1
Move those (actions only address to picked items) to the top of their layer.
Since the picklist for the customers is not refined, the picklist still contains all Customers picked in the previous made pick list.
So the action moves all the Customers (those that overlap a Seating) to the bottom of another layer.

Event 425
When its parent condition ran, the else will not run. One can safely assume that there is at least one Seating with Seating.Direction = 1. So, in fact, we dont even need to investigate event 426.

Event 425, again.
But say, there is not ONE Seating with Seating.Direction = 1. Then 424 is untrue, hence it will not run. And the else will run.
At this moment we start again with the picklist as picked in event 423.

Event 426
IF (OR = LOGIC) there is at least 1 Seating with Seating.Direction = 2,3 OR 4, this OR-construction will run.
The picking in this event starts then picking from the previous picked list (in 423) and picks from that previous picked list the Seating with Seating.Direction= 2 AND 3 AND 4.
The actions move those to the bottom of the layer.
Since the picklist for the customers is not refined, the picklist still contains all Customers picked in the previous made pick list.
So the action moves all the Customers (those that overlap a Seating) to the top of another layer.

So as you see, there are two BIG errors in this construction.
1/The else will just not run in most cases.
2/And the picking for the customers is just not refined.

Do this.

Seating.Direction = 1 ? (pick those Seating)
Customers = overlapping seating (pick the customers that overlap the previous picked Seating)
_____ Actions ... do that thing with layers and stuff

Seating.Direction not= 1 ? (pick those Seating with Direction not equal to 1)
Customers = overlapping seating (pick the customers that overlap the previous picked Seating)
_____ Actions ... do that thing with layers and stuff

Wish you had read 2 of the links that i provided you for your first problem. You would have understood 'picking'.

Dissapointed greetings.
B
33
S
18
G
27
Posts: 2,431
Reputation: 20,326

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest