[behavior] rex_LJpotential (attracting or rejecting objects)

Post your completed addons to share with the community

Post » Mon Jan 11, 2016 3:56 am

@Zebbi

Check the setting of this rex_LJpotential behavior in family CarF, sprite waypint, sprite blocker. You could copy from my sample capx.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Mon Jan 11, 2016 6:19 am

rexrainbow wrote:@Zebbi

Check the setting of this rex_LJpotential behavior in family CarF, sprite waypint, sprite blocker. You could copy from my sample capx.

Aww, I'm sorry for bothering you with this, it was my fault, I forgot to setup the objects the same, really apologize for not checking that first. Can I just take the opportunity to say what an amazing plugin this is, so many useful applications to it, so many :D of your plugins are invaluable!!
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Mon Jan 11, 2016 2:23 pm

rexrainbow wrote:@Zebbi

Check the setting of this rex_LJpotential behavior in family CarF, sprite waypint, sprite blocker. You could copy from my sample capx.

Two questions, how many instances o a waypoint can you have? I've made 10, and the 11th is causing the car to drive down towards the bottom of the screen. If I delete it so there's 11, it's okay. Also, what are blockers for? I would assume to top the car from going to waypoints behind walls, but I'm finding it's not really doing that?

https://www.dropbox.com/s/0177n4jbck3gr ... .capx?dl=0

EDIT: Fixed it by changing the indexes of each waypoint :D
Last edited by Zebbi on Tue Jan 12, 2016 4:54 pm, edited 3 times in total.
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Mon Jan 11, 2016 2:57 pm

@Zebbi

Yes, the order of waypoint is set in private variable, you might replace it by your picking method.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Mon Jan 11, 2016 2:59 pm

rexrainbow wrote:@Zebbi

Yes, the order of waypoint is set in private variable, you might replace it by your picking method.

@rexrainbow So, you could pick, say, nearest waypoint instead of using fixed indexes?

Finally, what's the best way of doing laps with the car? Currently, the goal function runs when it reaches the last way point, how can I make the car go round again to the first waypoint?
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Mon Jan 11, 2016 3:29 pm

@Zebbi

Sine I uses private variable to sort waypoint in instance group object, and pick them in order. I could put them back and sort them again while the group is empty, i.e. car had hit the last waypoint.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Mon Jan 11, 2016 3:31 pm

rexrainbow wrote:@Zebbi

Sine I uses private variable to sort waypoint in instance group object, and pick them in order. I could put them back and sort them again while the group is empty, i.e. car had hit the last waypoint.

I'm trying to see if there's a way to call the initial function that clears and orders the waypoint instances when the car hits the last waypoint, is this possible? And how? :?
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Mon Jan 11, 2016 3:47 pm

@Zebbi

Call function "Waypoints.Init" (Guide event sheet) to reset the waypoints. Checking if the car had hit the last waypoint is in event 9, event sheet Car AI.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Mon Jan 11, 2016 4:17 pm

rexrainbow wrote:@Zebbi

Call function "Waypoints.Init" (Guide event sheet) to reset the waypoints. Checking if the car had hit the last waypoint is in event 9, event sheet Car AI.

Thanks, that's working, the cars do a kinda cute little loop-the-loop and then they set off again :lol: Do I need to reset the way point earlier to avoid this? https://www.dropbox.com/s/nl57zl4k2c4yx ... .capx?dl=0
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Tue Jan 12, 2016 4:37 pm

@Zebbi

I fixed in this capx, see event 9.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest