Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Levels Pack02
01-28-2018, 05:29 PM
Post: #15
RE: Levels Pack02
(01-28-2018 11:31 AM)Alexey Wrote:  what does not work? do you have any warning messges during export or level loading in game?

Nope, no errors during export and during level initialization in the game itself. I use "print" with different messages to track down my functions step by step.
For example: I tried to setup NoDisturbTrigger to work on DR22.
  • I created new "Lackey" NPC with unique ID LCK9
  • I created two new jobs and made sure that all anchors accessible by LCK9 and that he can perform correct animations. I named his default job "Test" and his 2nd job "AfterNODB". I check them individually again and everything worked.
  • I created new "AnimAnchorFunction" anchor which is used to execute OnAnchor_AIAnchor115 function after playing "Custom_Chin" animation and placed it in-between of default job. SimpleTrigger151 was already set up by devs and connected to "game:Levels\Hotel\NoDisturbTrigger.lua" and "DR22"
  • In Hotel.lua I added Level.RoomIsBlocked to OnSave and OnLoad functions. And Level.RoomIsBlocked = false; to Level.OnInitialize() function.
  • I created Level.OnAnchor_AIAnchor115() function:

    function Level.OnAnchor_AIAnchor115()
    if ( Level.RoomIsBlocked == true ) then
    AI.SetJob( AI.FindNPC('LCK9'), 'AfterNODB' );
    end;
    end

    This one works 100%. I changed Level.RoomIsBlocked to false and LCK9 changed his job.
  • I created Level.OnPlacePlateDoor() function:

    function Level.OnPlacePlateDoor( doorId )
    if ( doorId == 'DR22' ) then
    Level.RoomIsBlocked = true;
    end;
    end

    This one broken. Script can't detect door ID. I used print('I see you'); and no messages popping up in the console window. I tried checking different floors doors ID's and no results too (ofc I used NODB trigger on proper doors). This is the first time when I got tilted and started to reaching for craziest theories.
  • I added NoDisturbSign ('NODB' unique ID) to Level.OnNotifyPickupItem() and checked "NotifyPickup" box:

    elseif ( fourCC == 'NODB' ) then
    Level.RoomIsBlocked = false;

    This one works 100%. I changed Level.RoomIsBlocked to true and as soon as I pickup NODB sign, LCK9 changes his job.

I already figured out what was wrong with "lift lackey". I was really down on morale after NODB sign tinkering and copied wrong callback function name on autopilot and didn't noticed it until today. I fixed it already.

Liz Shaw Wrote:What does the QuadTree have to do with NPC IDs? Also, what did you think of my modifications so far?

AI_QuadTree was one of my mad reaches, because I wasn't understanding why "lift lackey" wasn't working when I done everything right.

I checked your level, not a lot to test there. I noticed new distraction for Room 12 guard which is working alright, new lighting everywhere and 2 extra women NPC's -- one on the reception on other one in room 21. Great job so far, I hope you can came up with some nice ideas like recreating diplomat path from library to the restaurant, so you can take him out in the lift or somewhere else during his route.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Levels Pack02 - Alexey - 01-09-2018, 12:24 AM
RE: Levels Pack02 - ComradeReptiloid - 01-09-2018, 05:40 PM
RE: Levels Pack02 - ComradeReptiloid - 01-09-2018, 07:41 PM
RE: Levels Pack02 - Liz Shaw - 01-15-2018, 11:08 AM
RE: Levels Pack02 - Alexey - 01-15-2018, 11:36 AM
RE: Levels Pack02 - ComradeReptiloid - 01-18-2018, 05:30 PM
RE: Levels Pack02 - Liz Shaw - 01-19-2018, 02:36 AM
RE: Levels Pack02 - ComradeReptiloid - 01-19-2018, 04:25 PM
RE: Levels Pack02 - Liz Shaw - 01-21-2018, 04:43 AM
RE: Levels Pack02 - ComradeReptiloid - 01-24-2018, 11:48 AM
RE: Levels Pack02 - Liz Shaw - 01-24-2018, 12:49 PM
RE: Levels Pack02 - ComradeReptiloid - 01-27-2018, 04:46 PM
RE: Levels Pack02 - Liz Shaw - 01-28-2018, 02:39 AM
RE: Levels Pack02 - Alexey - 01-28-2018, 11:31 AM
RE: Levels Pack02 - ComradeReptiloid - 01-28-2018 05:29 PM
RE: Levels Pack02 - Liz Shaw - 01-28-2018, 05:40 PM
RE: Levels Pack02 - Alexey - 01-28-2018, 11:14 PM
RE: Levels Pack02 - Liz Shaw - 01-30-2018, 05:51 PM
RE: Levels Pack02 - Liz Shaw - 02-07-2018, 11:03 AM
RE: Levels Pack02 - Liz Shaw - 08-29-2018, 10:36 AM
RE: Levels Pack02 - Alexey - 05-20-2020, 11:21 AM
RE: Levels Pack02 - Liz Shaw - 05-20-2020, 11:55 AM
RE: Levels Pack02 - cream_soda - 05-20-2020, 09:16 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)