Results 1 to 10 of 10

Thread: SP Scripting - Problem with trigger

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by the_law View Post
    Here's the situation I'm trying to create: You are walking down a straight road when you are warned that a large enemy patrol is about to round the corner. You quickly find one of three hiding spots to hide in until the patrol passes.

    Now my problem here is that regardless of where I am, I will fail the mission with the message from "stealth_failed". I already checked for mapping mistakes that may have caused this, and I cannot find such a mistake.
    The problem is how you manage your triggers.
    PHP Code:
    level.visibleplaces getentarray("getseen","targetname"); //If you touch these triggers, you have been "seen" 
    level.visibleplaces are multiply entities. So the following code doesn't work (you should have gotten error messages while testing this in developer mode):
    PHP Code:
    level.visibleplaces triggerOff();
    level.visibleplaces waittill("trigger"); 
    You could select all those entities and remove the trigger and add them all as one entity. Or if you already have them as one then you only need to change your code to 'getent'.
    Otherwise with multiple entities you need to create a thread for each trigger.

  2. The Following User Says Thank You to Mitch For This Useful Post:

    the_law (4th September 2015)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •