# [SOLVED]Make an object move through a fixed and random track

Get help using Construct 2

### » Fri Jun 05, 2015 10:32 pm

XpMonster wrote:Of course, i'll keep working on this for myself, there is still a LOT to do.

https://dl.dropboxusercontent.com/u/39210620/Isometroid.capx

Great job, @XpMonster!

It works very well!
B
39
S
9
G
3
Posts: 261
Reputation: 4,377

### » Sat Jun 06, 2015 4:57 pm

@R0J0hound, do you know how to change the direction of the character's animation walking in a eight directions game, but without having to use the behavior of eight directions?

I've tried the delimitation of the angle and the X position, but I couldn't.

B
39
S
9
G
3
Posts: 261
Reputation: 4,377

### » Mon Jun 08, 2015 8:16 pm

B
95
S
33
G
128
Posts: 5,491
Reputation: 81,570

### » Tue Jun 09, 2015 12:08 am

R0J0hound wrote:@lukezero
Here's an idea.
viewtopic.php?f=147&t=65352&p=558087&hilit=8dir#p558087

It's a good solution, @R0J0hound.

I'm trying to implement it in my game containing a predetermined track, but he does not use this behavior (8direction).

Thanks one more time for your great help!
B
39
S
9
G
3
Posts: 261
Reputation: 4,377

### » Fri Jul 17, 2015 7:44 pm

@R0J0hound, I need your great help again.

I'm trying to implement an alternative aleatory paths system to a game based on the simple_path_follow.capx you posted here.

https://dl.dropboxusercontent.com/u/542 ... ollow.capx

I'm trying to do this:

I believe that the right way to do this is by identifying the black circles through UID, but I cannot implement it. For this, I left the black dots that make up the parallel paths with equal values in the variable "n".

So I tried (unsuccessfully) to do their own event to redirect the avatar, making the following changes:

Set group "Move" deactivated (group Move contains the original trail movement events)
Set dist2target to distance (self.X, Self.Y, Dot (choose (30,31)). X, Dot (choose (30,31)). Y)
Set calc_angle to floor (angle (oldX, oldy, Dot (choose (30,31)). X, Dot (choose (30,31)). Y))

And to set back the avatar to follow the track again:

Set group "Move" activated

Thank you very much if you can help me again, dude!
B
39
S
9
G
3
Posts: 261
Reputation: 4,377

### » Mon Jul 20, 2015 8:10 pm

If anyone has suggestions, feel free to post.

Indie developer suffers by trying to do everything alone...
B
39
S
9
G
3
Posts: 261
Reputation: 4,377

### » Tue Jul 21, 2015 2:38 am

Note quite so simple, but meets your needs as specified, hopefully. Requires Lines that know their Nodes, not just Nodes.

http://www.blackhornettechnologies.com/ ... k_BHT.capx

You'll need LiteTween: viewtopic.php?t=70700&start=0
B
71
S
22
G
273
Posts: 3,823
Reputation: 150,789

### » Tue Jul 21, 2015 10:50 am

Thanks so much for the recommendation and the CAPX, @blackhornet.

I will try to implement it now and give a feedback. ^^

It really not easy to implement random tracks in actual CAPX example, so that not only I did not get so far, like his creator himself either.

Very grateful for your great help!
B
39
S
9
G
3
Posts: 261
Reputation: 4,377

### » Tue Jul 21, 2015 1:21 pm

@blackhornet the function Browser is required? I ask this because I'm making a mobile game and I don't know how this function behaves in a game of this type.

Apparently in this case its function is only textual. ^^
B
39
S
9
G
3
Posts: 261
Reputation: 4,377

### » Tue Jul 21, 2015 1:38 pm

Browser is only used for logging. You can remove it.
B
71
S
22
G
273
Posts: 3,823
Reputation: 150,789

PreviousNext