Personal suggested Manual notes (use with caution)

If you have found a bug, or have a suggestion/comment then leave it here

Post » Tue Jul 21, 2015 9:40 pm

@Kyatric

The specific block I was trying to do (I've since amended it):

Create object "Hero3" on layer "UI2" at (ScrollboxList.x, ScrollboxList.y + Hero3.Height/2 + UIMARGIN) on Layout 1.

I have a copy of "Hero3" on Layout 2, but the sprite still gets fixed mostly at the top of the list (ScrollboxList has the origin set to the top middle) instead of wholly enclosed within ScrollboxList as expected, suggesting that Hero3.Height = 0. I since replaced it with a flat number. This is only a problem for the first item in the list because I then use an instance variable ScrollboxList.CurrentElementY += Hero3.Y + Hero3.Height and that replaces my create Y coord. This works so long as all of my Heroes are the same height.
B
10
S
2
G
2
Posts: 73
Reputation: 1,044

Post » Wed Jul 22, 2015 9:40 am

Still prefer to post in the how do I to get confirmation first and providing your capx to just making sure you are having a correct and efficient implementation.
From the description you just did, I did not understand what you are trying to achieve and what you are actually doing, it is easier to see an actual project and preview it for those kind of things.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Wed Jul 22, 2015 11:21 am

Okay, since you wanted a demonstration:

https://dl.dropboxusercontent.com/u/552 ... yDemo.capx

Sprite 2 exists and I can reference it's height/width just fine. Sprite 1 only exists in Layout 2, so when I create it in Layout 1 it's Height is 0 at the time of creation.

This is the kind of stuff that needs to be better documented. This is not a "personal" suggestion, but something I would add to in a wiki, nor does it need to be used with caution. It's simply providing information about what I can and cannot do in the engine, not a suggestion.

Just like the mouse cursor: Placing the mouse sprite in layout 2 is not enough if I wish to set the cursor to that sprite in layout 1.

Ultimately my goal is to create a scrollable list populated with sprites. I've done it in events. It's a bit messy, but I think I have the execution mostly done. For optimization, I think I may have better results keeping a copy of every object and moving them instead of creating/destroying.
B
10
S
2
G
2
Posts: 73
Reputation: 1,044

Post » Wed Jul 22, 2015 4:37 pm

Again, what you are referencing is a picking issue.
The object type does exists in the project and is accessible. But on your actual layout there is no actual instance.

Best way to understand it, add a "Wait 0 action" and copy the create action under it.
Now you have two instances of Sprite in your layout and the second instance is positioned where you expect it.
Because the second "Create" action DOES have an instance to reference (which the first does not).

You are talking about clearer documentation, yet, and reread my previous messages that's what I've said all along, you're not using the correct vocabulary.
You are talking about object (in C2's vocabulary object type) when it's all about instances.

I'll amend the fact that indeed, the initial instance in the whole project is not "used", you need to have an instance in the current layout to reference it the way you are wanting to.
But again, and in regards to how picking works, it's only logical.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Previous

Return to Website Issues and Feedback

Who is online

Users browsing this forum: No registered users and 3 guests