ObLars Posted October 28, 2010 Share Posted October 28, 2010 Im currently working on a NPC, who has a Sandbox package, a Travel and a sleep package. He sandboxes from 6am to 9pm. At 9pm he travels into a house. I want the sleep package to turn on at the moment he enters the house. Which is at 21.05 or so. It takes him about 5 seconds to walk from the sandbox area to the house. At the moment, when he enters the house, he just stands there. Doing nothing but eyeballing me the last 55 seconds until the sleep package starts then goes to sleep. Help? :) Link to comment Share on other sites More sharing options...
Povuholo Posted October 28, 2010 Share Posted October 28, 2010 Im currently working on a NPC, who has a Sandbox package, a Travel and a sleep package. He sandboxes from 6am to 9pm. At 9pm he travels into a house. I want the sleep package to turn on at the moment he enters the house. Which is at 21.05 or so. It takes him about 5 seconds to walk from the sandbox area to the house. At the moment, when he enters the house, he just stands there. Doing nothing but eyeballing me the last 55 seconds until the sleep package starts then goes to sleep. Help? :)First of all, put the sleep package higher in the list of his AI packages than the travel package. Secondly, you could add the condition 'getincell <the house> == 0' for the travel package, so that the travel package is cancelled as soon as he enters the house. Then it should automatically switch to the sleep package. An alternative solution could be to remove the travel package completely and point the sleep package target directly at a bed inside that house, so he'll switch from sandbox to sleep directly. He'll travel to the house, go inside and go to sleep, without needing a separate travel package to bring him to the house first. Link to comment Share on other sites More sharing options...
ObLars Posted October 28, 2010 Author Share Posted October 28, 2010 Im currently working on a NPC, who has a Sandbox package, a Travel and a sleep package. He sandboxes from 6am to 9pm. At 9pm he travels into a house. I want the sleep package to turn on at the moment he enters the house. Which is at 21.05 or so. It takes him about 5 seconds to walk from the sandbox area to the house. At the moment, when he enters the house, he just stands there. Doing nothing but eyeballing me the last 55 seconds until the sleep package starts then goes to sleep. Help? :)First of all, put the sleep package higher in the list of his AI packages than the travel package. Secondly, you could add the condition 'getincell <the house> == 0' for the travel package, so that the travel package is cancelled as soon as he enters the house. Then it should automatically switch to the sleep package. An alternative solution could be to remove the travel package completely and point the sleep package target directly at a bed inside that house, so he'll switch from sandbox to sleep directly. He'll travel to the house, go inside and go to sleep, without needing a separate travel package to bring him to the house first. Ahhhh. Kudos. Completly removing the Travel package will make it seem cleaner. Thanks a lot. All i needed actually. :) Link to comment Share on other sites More sharing options...
Recommended Posts