Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: coxy17 on February 12, 2014, 06:39:43 PM
-
Hi,
I have a trigger (Cube) and ive broken it down into 4 sections. Call it front, left, right and back.
so now I have 4 objects grouped. I have setup my trigger events ok but I need to destroy/disable the other triggers untill I exit 1 of of the 4 squares.
So basically I enter the trigger called front and I want to diable the triggers for the other 3 triggers. But enable them again upon exit.
I get how to use the 'destroy' object in playmaker but not sure if there is a better way to temporarily hide objects.
Hope it makes sense.
nick
-
Just use Activate Game Object and check whether it will be On/Off when you go into the "entered" state of a trigger. If you store the other triggers as variables then its easy to target them with a few actions and turn them back on when you exit the trigger.
-
Hi Lane,
Yes that is what im after. Ive tried what you said but when it goes to state 2 it doesn't deactivate until i leave the state?
STATE 1. i have an activate game object with a bool variable to true
STATE 2. I use a set bool value and replace with another bool to false.
I think ive done it wrong? and what happens if i want to get the object back again after?
sorry just for some reason im not getting it.
Nick
-
You don't need a bool, you just need two Activate Game Object actions. The checkbox indicates whether or not it is activated.
When you want to change it, just send an event to that FSM.
-
Hi,
Ive tried what you said and its works to deactivate the object but doesnt activate the object again? playmaker goes blue and stops working?
all i have is 2 states
1. activate state - on trigger enter
2. deactivate state - on trigger exit
It seems like i cant reactivate from the FSM on the object that is being deactivated?
Nick
-
Ah, yeah you can't deactivate the object and then tell it to reactivate it... It's deactivated.
You need to deactivate/reactivate from a different FSM, so that it doesn't turn itself off.
-
ok, ive got it to work now. changed nothing other than moving to another FSM.
thanks
Nick