Question Pressing button via actions and triggers

rabbit1qaz

Active member
Messages
310
Reactions
35
Points
28
I have button with some triggers attached. Is it possible for other triggers to press that button ?
 
Not directly, I think. However, you could put a Relay brick (from LogicBricks) on your buttons. Move whatever triggers you had on the button to the relay and have the button trigger the relay. If you now want to "press the button" via trigger, just trigger the relay to do exactly the same as the button would do.

If you want the UI effect of the button pressed you probably need a custom plugin that does that for you.
 
Upvote 0
Another graphical way is to place all the triggered options from the buttton on a collision trigger.
Than add something the collison trigger can interact with, for example an Shape/Sphere.
In the atomfilter of the collision trigger you choose this Shape/Sphere.
To the collsion trigger add the trigger action to turn the Shape/Sphere Atomcontrol "Off"
Enter the control of the Shape/Sphere and turn the atom off.
Place the shape/sphere inside the collision trigger.

Now you can trigger the atom control of the shape/sphere to "On" from everywhere else (Buttons or anything). This will cause to trigger all you want from the collision trigger.
To make the shape/Sphere invisible adjst the Alpha in the Material section.

But for sure with MacGrubers Logicricks as he dscribed this is way easier.
 
Upvote 0
Another graphical way is to place all the triggered options from the buttton on a collision trigger.
Note that abusing the collision/physics system for this kind of thing is rather unreliable (behaves different at different frame rates) and also extremely wasteful performance-wise. Back in the dark ages of VaM some years ago that was the way to do things, but that was before VaM ScriptEngine and later the official plugin support.
 
Upvote 0
Note that abusing the collision/physics system for this kind of thing is rather unreliable (behaves different at different frame rates) and also extremely wasteful performance-wise. Back in the dark ages of VaM some years ago that was the way to do things, but that was before VaM ScriptEngine and later the official plugin support.
Good to know. Indeed I was wondering the collision triggers are sometimes not reliable.
 
Upvote 0
Back
Top Bottom