Jump to content

AI Package Question


Dbrock1980

Recommended Posts

There is an activate package procedure or you could use a script fragment to make your NPC activate the lever at the beginning/end of any package.

 

Unfortunately I'm not sure how to use script fragments or what it needs to look like. Not very good at scripting

Link to comment
Share on other sites

If the Activate procedure doesn't work as intended, adding a script fragment is pretty simple.

 

Assuming that your package ended with your NPC in the right place (i.e. next to the lever), you would:

  1. Open the Begin/End/Change tab on your package
  2. Type a semicolon in the text box under On End
  3. Click Compile to create a new script
  4. Replace the semicolon with something like
    WaterLever.Activate(akActor) ; Turn the water on
    Utility.Wait(3.0) ; Wait 3 seconds
    WaterLever.Activate(akActor) ; Turn the water off
  5. Click Compile again
  6. Select your new script in Attached Scripts and click Properties (I can't remember if you need to close the package and then reopen it to make Properties selectable)
  7. Set the WaterLever property to your lever reference.
Link to comment
Share on other sites

 

If the Activate procedure doesn't work as intended, adding a script fragment is pretty simple.

 

Assuming that your package ended with your NPC in the right place (i.e. next to the lever), you would:

  • Open the Begin/End/Change tab on your package
  • Type a semicolon in the text box under On End
  • Click Compile to create a new script
  • Replace the semicolon with something like

    WaterLever.Activate(akActor) ; Turn the water on
    Utility.Wait(3.0) ; Wait 3 seconds
    WaterLever.Activate(akActor) ; Turn the water off
  • Click Compile again
  • Select your new script in Attached Scripts and click Properties (I can't remember if you need to close the package and then reopen it to make Properties selectable)
  • Set the WaterLever property to your lever reference.

 

Awesome! Thanks so much! I was able to get it with the activate package. I just made two (one for on and one for off) a few mins apart and a .25 duration. I've tested it once and it seemed to work. I'll check it again and if nothing happens I'll definitely do this. Fantastic!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...