[behavior] rex_LJpotential (attracting or rejecting objects)

Post your completed addons to share with the community

Post » Mon Jun 22, 2015 9:35 pm

@rexrainbow

I added some minor functionality to this behavior; just thought I'd share:

https://www.dropbox.com/s/8z7ljt5qhqxzh ... od.7z?dl=0

Changes:

1. Can see and set params A/n/B/m in debug mode.

2. Can get params A/n/B/m as expressions, so these values can be retrieved during runtime.

Feel free to roll these into the official version if you feel like it. :)
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Jun 23, 2015 3:34 am

Update

Add expression: A, n, B, m.
Display Parameters A,n,B,m on debug panel.

@TiAm

I had merged them, thanks for sharing.
But I changed expression name Param_A to A, Param_n to n, Param_B to B, Param_m to m.
B
108
S
26
G
268
Posts: 4,456
Reputation: 150,247

Post » Tue Jun 23, 2015 9:04 pm

@rexrainbow

Thanks for merging. :)
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sun Jun 28, 2015 5:32 pm

The cars AI v2 looks great, Now "only" needs a way to resolve the short path to get the best fast time and perfect :P

Also this remember this Mario AI:
https://www.youtube.com/watch?v=DlkMs4ZHHr8

The red lines seems to calculate que best/fast way to resolve the situation but maybe looks too complicated to do something similar and will be better for another kind of behaviour.
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Mon Jun 29, 2015 2:39 am

@matriax

This behavior does not calculate the shortest path.
Since this behavior does not affect the movement of sprite, designer could add another leader angle/force by shortest path calculation.
B
108
S
26
G
268
Posts: 4,456
Reputation: 150,247

Post » Sun Jul 26, 2015 7:35 pm

@rexrainbow
Interesting plugin, i am trying to understand it but im stuck... i am trying to edit your crowd with 2 sources and 2 targets to see how they interact:
https://dl.dropboxusercontent.com/u/169 ... rowd2.capx
But i just cant get it to work... for ones to go from left to right and for others from right to left... :(

Help!?

TNX!

PS:
when i stop units by bullet disable, they still rotate under other units forces ...
How do i just dead stop units to be like solid?
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Sun Jul 26, 2015 11:54 pm

@irina

Disable event 4, event 6 to stop them. You might add more conditions to pick disabled instances.

Edit
Rotating or other movement are controlled in event sheet by designer. So they could be disable very easily. This rex_LJpotential will not affect sprite.
B
108
S
26
G
268
Posts: 4,456
Reputation: 150,247

Post » Sun Oct 11, 2015 12:17 am

Are the cars driving with constant speed, even in a turn? I'm asking, because I'm racking my brain how to simulate a race. The cars have differen engines with different speedups, some have better brakes some better tires which all effect there way of driving and in the end there result. Well, and in a real car race, there have to be a brakeingpoint (the last/best moment where the driver hits the brake). This is very important, because some drivers (or cars) will brake later then others, which will give them an edge (in case they don't brake to late). I'm trying to simulate that action in a way. I searched the web but evertime I thougt I found something, the cars were never hitting the brake....it looks kind of automatic for me....not like a real race. Even though this is by far the best race-example for construct2 I have seen. Maybe someone has an idea, how to combine the "AI of Race car v2" example with my request. Or maybe a totaly different solution. It would really help me a lot, even the smallest hint, because I'm nearly giving up on this.
B
18
S
8
G
6
Posts: 35
Reputation: 4,759

Post » Sun Jan 10, 2016 11:27 pm

@rexrainbow I tried cloning all of the events and objects into a new project for playing with, but the cars don't start. What's missing that should make them move? https://www.dropbox.com/s/kpyvn92j9poln ... .capx?dl=0
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Mon Jan 11, 2016 3:29 am

@mario4president

This behavior only provide a "leading angle", the car controlling by using this leading angle is another issue.
Sorry I could not help you.
B
108
S
26
G
268
Posts: 4,456
Reputation: 150,247

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest