The two scripts you have look a little redundant.
The first one is a trigger script specifically meant to raise a specific wall. It finds an object in the scene called "verticalWall_1" and raises that wall automatically when you go through the trigger.
The second script is a script that raises a wall when you tell it to. It doesn't have the trigger component so something would have to tell it to trigger.
If your question is how to make it so that the first script can raise any wall, then you would need to remove this code:
wall = GameObject.Find("verticalWall_1");
un-comment out this code:
//raise = wall.GetComponent();
//raise.raiseWall();
and un-comment out this code:
/*
void raiseWall()
{
float step = speed * Time.deltaTime;
targetWall.transform.position = Vector3.MoveTowards (transform.position, targetWall.position, step);
}*/
from the first script. Put that script on your trigger, and then just drag whatever you want to be raised into the "wall" slot that will show up in the inspector.
ALTERNATIVELY if yo really need to do it with two scripts for some reason with the setup you currently have, then you will need to use a getcomponent script. I'll go over that in a comment on this post because it's already getting long
↧