Please or Register to create posts and topics.

Trigger OnPainted [Solved]

Hi there!
I'm currently trying to finish my first map but I've crossed a problem I couldn't solve anyhow so far. My question is: is there any way to trigger something, when paint crosses a certain point, or when a surface becomes painted? Also would be nice if the paint type was settable.

I really should finish this one before we'd leave for vacation next week. Any help would be appreciated a LOT. Thanks in advance!

Solved! For those who would face the same issue in the future, I'm certain that this is not the only way, probably not the easiest either, but:

1: Create the gel dropper, configure it as you wish.
2: Create a small (16x16 e.g) box under the paint sprayer, with Nodraw texture.
3: Change the box's class to a func_physbox...
- Performance Mode: No Gibs
- Strength: 1
- Material Type: None
- Name: [whatever you desire, but there must be one]
(Update: Setting the strength to 1 is enough, yet they gather up sometimes, so it's best if you just create a trigger_hurt and tick the flags necessary.)

(So it will just break when it hits the floor and not cause any difficulties to the players nor increase CPU usage to undesired levels.)

4: Create a point_template entity...
- Name: [whatever you desire, but there must be one]
- Template 1: [name of the func_physbox]
5: Create an env_entity_maker entity...
- Name: [whatever you desire, but there must be one]
- Point_template To Spawn: [name of the point_template]
6: Create a logic_timer entity...
- Name: [whatever you desire, but there must be one]
- Start Disabled: Yes
- Refire Interval: 1
7: Give it an output...
OnTimer -> [name of the env_entity_maker] -> ForceSpawn (NOT ONLY ONCE)

After these are done, trigger the logic_timer with an "Enable" output, along with the paint sprayer. What you did so far, there will be small invisible boxes inside the paint that will break/disappear (totally invisibly but there is a very silent sound that you just can't disable) when falling onto any surface. (All the little boxes have the same name.)

8: Create a filter_activator_name entity...
- Name: [whatever you desire, but there must be one]
- Filter Name: [name of the func_physbox]

9: Create a trigger_multiple/once whatever you want to the specified point...
- Filter Name: [name of the filter_activator_name]
- At the flags, tick only the Physics Objects

10: Give it an output...
OnStartTouch->[...]

This method works if you want to send the paint to a specific spot with the tractor beam or through ways the paint would not be shot into the air, because then you would have to play with it so the boxes would fly as far as the paint does.

I see that this is not really a frequent issue mappers come across, as I could not find a tutorial for such anywhere, but I hope even if not for the same issue, I could give some ideas to deal with similar problems.

FYI: if you are only using one template you do not need an entity maker. you can forcerespawn a point_template.

Image
PortalStories.com
"Oh, in case you got covered in that repulsion gel, here's some advice the lab boys gave me: DO NOT get covered in the repulsion gel."