Trace of an object?

Get help using Construct 2

Post » Wed Jul 23, 2014 4:43 pm

Here is a capx I made. I want the moons path to be traced by a white line but I don't want the line to disappear.
For this, I create a sprite in the moon's position every tick. However, this method is unreliable because it creats too many objects, slowing the game.

Can you suggest a better way to do this?

And I don't know why the texts of the text boxes are not changed at the start. :?:
You do not have the required permissions to view the files attached to this post.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Wed Jul 23, 2014 5:06 pm

hello there i cant help you out but for the textbox. you must use something like this:

E_xdistance.Text
E_xspeed.Text
E_ydistance.Text

add .Text
yolinux
B
18
S
5
Posts: 19
Reputation: 1,545

Post » Wed Jul 23, 2014 5:18 pm

kossak wrote:hello there i cant help you out but for the textbox. you must use something like this:

E_xdistance.Text
E_xspeed.Text
E_ydistance.Text

add .Text

It's not like that. Please see the attached capx.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Wed Jul 23, 2014 5:52 pm

@Doc Ai
You could use the Paster plugin so the object count doesn't increase.
https://dl.dropboxusercontent.com/u/542 ... aster.capx

Also it appears you need to use str(E_xdistance) when setting the text instead of E_xdistance. Would be a good topic for a bug report.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Wed Jul 23, 2014 6:13 pm

I think your solution is fine, maybe you could delete overlaping objects or check if count is bigger than a certain amount(max objects), about the text, jus add str() to them, as they are numbers and need to be converted to strings
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 Jul 23, 2014 6:24 pm

Another idea if you don't want to use a plugin.

Add a Global called trailoverlap then set it to 1 when trail overlaps itself.
Reduce the trail generation time, i.e. only create a trail every 0.1 seconds and only when Global trailoverlap = 0.

See attached.
You do not have the required permissions to view the files attached to this post.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,386
Reputation: 58,454


Return to How do I....?

Who is online

Users browsing this forum: datiel12, tarek2, Yahoo [Bot] and 12 guests