[behavior] rex_light

Post your completed addons to share with the community

Post » Sat Aug 08, 2015 2:18 am

@UberLou

You might try "Action:Point to object", and disable collision of instances which you want to ignore.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Sun Aug 09, 2015 1:47 am

Thanks for the suggestion. I tried that action but I don't think it's what I'm looking for. Point to object seems to adjust the width until it hits one object. I would like to add multiple objects and also only scale the width to maximum 700 pixels.

Here is a capx to demonstrate what I mean. Is there a way to have the laser sprite hit the Enemy sprites too without making them solid?
B
80
S
52
G
41
Posts: 370
Reputation: 25,830

Post » Mon Aug 10, 2015 3:29 am

@UberLou

I could not get your point clearly.
You might set "Obstacles" to "Custom" in properties table if you want to assign a custom obstacles in event sheet.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Mon Aug 10, 2015 3:55 pm

That worked. I didn't notice there was a "Custom" setting. Thanks!
B
80
S
52
G
41
Posts: 370
Reputation: 25,830

Post » Sun Mar 06, 2016 7:53 pm

Hi again Rex! I have another question about this plugin. I need to destroy an object that has the Light behavior if the object doesn't hit any obstacle. Whats strange is that destroying the object when the object.width=light.maxWidth actually returns max width when there is an object it should hit. I've put together a capx to show what I mean. In the capx, if you shoot (click the mouse) when youre just to the right of the thin line, the max width is around 287. However if you shoot a little to the left of the line, max width jumps to 500. 290-499 are never returned. Is this a bug or am I going about this the wrong way?

Example: http://www.louisferina.com/games/Light.capx

Thanks!
B
80
S
52
G
41
Posts: 370
Reputation: 25,830

Post » Tue Mar 08, 2016 3:53 am

Update

Fix bug of calculating width in hit testing.


@UberLou
Thanks to point out this bug. Please updating this behavior again.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Wed Mar 09, 2016 12:00 am

Just tested it out and looks like it works great. Thanks for fixing it!
B
80
S
52
G
41
Posts: 370
Reputation: 25,830

Post » Fri May 06, 2016 5:19 am

@Johncw87 's trace (raycast) plugin is better then this behavior. So I will recommend user try that plugin first.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Previous

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests