playMaker

Author Topic: SetProperty to a referenced GameObject - solved  (Read 804 times)

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • View Profile
    • KZ Development
SetProperty to a referenced GameObject - solved
« on: April 27, 2014, 09:34:43 AM »
Okay,


Here's what I'm trying to do:

Setting a component value to X (Set Property)

I need to do this one an object I have saved from a collision event "Collider: Who"

Now I need to change Who's component value (example collider on the who object to off)

I've tried:

Set Fsm object to "test"

Than I try "set Property target object test"
But the "object" type I cannot change,
therefore the property I cannot access.

I have a feeling I'm going at this the wrong way,
but how do I truly reference an component from a collider event such as this,

I've tried has component and other fun stuff.

Please help,

thanks

I have  tried Set Property but I need to set it through finding the game object :from the collider,

as I cannot drag and drop which item it will be - since there is no idea which one you will hit in runtime.

How can I set property on a collider custom script is the question :)


I finally figured it out -------

I can do a "get component"
Game OBj; "collider" (saved from teh collider event)
ObjectType; (variable from FSM, set to the "script")
Store comp. (as the var u want)

then you can do "Set property" on the "saved
the var you wanted... change the property,

wohoo!
« Last Edit: April 27, 2014, 04:11:21 PM by kici »