[behavior] rex_light

Post your completed addons to share with the community

Post » Fri Oct 03, 2014 12:28 am

rexrainbow wrote:@Hardty

The most easy way is using this tool. Or check the document of this behavior.

alright! thanks very much Rex! your plugin n behavior very useless for me :mrgreen: i will waiting for other plugins n behaviors from you :D
~Everyone can make GAMEs~
B
57
S
12
G
1
Posts: 414
Reputation: 5,936

Post » Wed Nov 19, 2014 9:31 am

Hi @rexrainbow I think I found a bug..

The behaviour seems to lag one frame behind, if you have many rays spinning around very fast you can see it easier, like this:

https://dl.dropboxusercontent.com/u/533 ... xlight.mp4

https://dl.dropboxusercontent.com/u/533 ... light.capx

if you manually set light point every frame, it fixes it but is slower.
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Wed Nov 19, 2014 10:54 am

@keepee

It's because that the behavior is running before events in a tick.
B
109
S
27
G
276
Posts: 4,479
Reputation: 154,418

Post » Wed Nov 19, 2014 11:52 am

@rexrainbow that's what I thought.. do all behaviours have to run before events? If so, I didn't know that.
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Wed Nov 19, 2014 2:21 pm

@keepee

Objects or behaviors all could do something before and after events. Most of them ran before events, only few behaviors ran after events.
For example, official pin behavior would set related position after events to ensure that the changing of position of pinned object had done.
B
109
S
27
G
276
Posts: 4,479
Reputation: 154,418

Post » Sat Nov 29, 2014 8:41 pm

Hey rexrainbow, this plugin is awesome!
I have been trying to make a ray system for lasers for a while now, but I could never produce something that didn't kill performance whilst maintaining high accuracy. My final attempt involved setting the laser to it's "maximum width", then dividing the width until it no longer collides, then multiply the current width a little bit blahblah, it didn't work too well and performance was bad. But then you bless us with this beast of a Behaviour!
Before I attempt to even begin to interpret how you made this plugin work, could you tell me how you done it in pseudo-code? Would this behaviour essentially be possible to recreate in events?
I would think the most accurate but CPU-intensive way is to increase the width +1 in a loop until it hits a wall then -1 width and done. I'm very curious about how done this :P
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Sun Nov 30, 2014 7:20 am

@Jase00

Almost closed. I first starts from current width; decreases width until no collision; then increases width until just collision. See this
The decreasing/increase is
Code: Select all
current width - delta width

Code: Select all
current width + delta width

delta width will increasing by multiplier 2, i.e.
Code: Select all
delta width = delta width *2
B
109
S
27
G
276
Posts: 4,479
Reputation: 154,418

Post » Sat Aug 01, 2015 1:48 pm

Please tell me how to do the second sample? Or give a file of it if you have.
B
2
Posts: 1
Reputation: 152

Post » Sat Aug 01, 2015 3:25 pm

@VVK
Is it?
B
109
S
27
G
276
Posts: 4,479
Reputation: 154,418

Post » Fri Aug 07, 2015 5:04 pm

Thanks for this plugin! I was wondering if there was a way to include objects that don't have the solid behavior? I would like to use this as sort of an instant bullet but I don't want enemies to be solid.
B
80
S
52
G
42
Posts: 370
Reputation: 26,330

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests