Thread: Talkative monsters

Results 1 to 4 of 4
  1. #1
    Registered User KneeGrow's Avatar
    Join Date
    May 2013
    Posts
    25

    Talkative monsters

    I've been wanting to modify an existing sample NPC script (monster_barney_custom.as) to make barney talk more often than the normal barney (maybe more than 1 speaking at a time).
    Talk as in, standing around w/ idle chit chat.
    https://pastebin.com/NxsEJHuJ
    However, I can't seem to find the code that deals with that.
    Does anyone know of a code snippet that might help?

    On closer inspection
    Code:
    case SCHED_IDLE_STAND:
    			// call base class default so that scientist will talk
    			// when standing during idle
    			@psched = BaseClass.GetScheduleOfType(Type);
    
    			if (psched is Schedules::slIdleStand)		
    				return slIdleBaStand;// just look straight ahead.
    			else
    				return psched;
    looks like a good place to start, only I'm not familiar with internal enums for barney

  2. #2
    Registered User
    Join Date
    Feb 2016
    Location
    Germany
    Posts
    147

    Re: Talkative monsters

    Does your barney even talk as it is right now?
    The script doesnt even precache his speaking sound files

  3. #3
    Registered User KneeGrow's Avatar
    Join Date
    May 2013
    Posts
    25

    Re: Talkative monsters

    Quote Originally Posted by _RC View Post
    Does your barney even talk as it is right now?
    The script doesnt even precache his speaking sound files
    Actually, no. When writing this I assumed he did without taking a look at the entire script. And I'm at a loss either way since I don't think I know how to add/modify schedules to make custom barney speak, at least in a way that normal barney would do.

  4. #4
    begadang jangan begadang =_= anggara_nothing's Avatar
    Join Date
    Jan 2016
    Location
    Indonesia
    Posts
    155

    Re: Talkative monsters

    Since in SC you got only basic CBaseMonster class, yeah i guess you need to reinvent the wheel again.

    https://github.com/ValveSoftware/hal...ster.cpp#L1026

    https://github.com/ValveSoftware/hal...arney.cpp#L455

Posting Permissions

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