Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object WWTDOn : CommandScript
- {
- WWTDOn()
- {
- SetIcon("floodlightson");
- SetCursor("lighton");
- SetGroupLeader(true);
- SetRestrictions(RESTRICT_SELFEXECUTE);
- SetPriority(100);
- }
- bool CheckPossible(GameObject *Caller)
- {
- if (!Caller->IsValid())
- return false;
- if (Caller->GetType() == ACTOR_VEHICLE)
- return true;
- return false;
- }
- bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
- {
- if (!Caller->IsValid() || !Target->IsValid() || Target->GetID() != Caller->GetID())
- return false;
- if (Caller->GetType() == ACTOR_VEHICLE)
- return true;
- return true;
- }
- void PushActions(GameObject *Caller, Actor *Target, int childID)
- {
- Vehicle v(Caller);
- v.EnableTrafficLight(TLT_YELLOW);
- v.AssignCommand(CMD_WWTD_OFF);
- v.RemoveCommand(CMD_WWTD_ON);
- Audio::PlaySample3D(SND_TOGGLE, v.GetPosition());
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement