> For the complete documentation index, see [llms.txt](https://gley.gitbook.io/mobile-traffic-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gley.gitbook.io/mobile-traffic-system/complete-api/setprioritycrossingstopstate.md).

# SetPriorityCrossingStopState

### Description

Inform the priority pedestrian crossing that pedestrians started/stopped to cross.

### Declaration&#x20;

```csharp
 public static void SetPriorityCrossingStopState(string crossingName, bool stop, bool stopUpdate = true)
```

### Parameters

<table><thead><tr><th width="198">Name</th><th>Description</th></tr></thead><tbody><tr><td>crossingName</td><td>The name of the street crossing.</td></tr><tr><td>stop</td><td>Stop the vehicles.</td></tr><tr><td>stopUpdate</td><td>Currently not used, no automatic update implemented.</td></tr></tbody></table>

### Example

```csharp
using Gley.TrafficSystem;
using UnityEngine;
public class Test : MonoBehaviour
{
    //a reference to vehicle pool and player assigned in inspector
    public VehiclePool vehiclePool;
    public Transform player;

    void Start()
    {
        API.Initialize(player, 20, vehiclePool);
    }

    public void SetCrossingToRed()
    {
        //change the Crossing_2 to red - vehicles will stop, and pedestrians should cross now
        API.SetPriorityCrossingStopState("Crossing_2", true, true);
    }
}

```
