61
MM8BDM Discussion / Re: So About Adding NPCs...
« on: August 02, 2017, 10:17:27 PM »
Hmm. Can you upload the file so I can see what's going on?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
actor DunkelmanProp : CutmanProp 19643
{
//$Category MM8BDM-NPC
Translation "198:198=41:41", "198:198=228:228"
States
{
Spawn:
BARB A 5 A_LookEx(LOF_NOSOUNDCHECK, 0, 100, 0, 360, "See")
loop
See:
BARB A 5 ACS_Execute(101,0,1)
Goto Spawn
Talking:
BARB IAIAIAIAIAIAIAIAIA 4
Goto Spawn
}
}
That'll do. Then you need a talk script.int talkdelay = (35*4);
Script 101 (int whichcharacter)
{
int message = Random(0, 4);
int PropTID = ActivatorTID();
while(OldMessage == message) //Ensuring NPCs don't repeat.
{
message = Random(0,4);
}
TakeActorInventory(PropTID, "CutterFlag", 10);
GiveActorInventory(PropTID, "CutterFlag", message);
SetActorState(PropTID,"Talking",0);
switch(whichcharacter)
{
Case 1:
switch(message)
{
Case 0:
NPC_Talk (0.8, 1, "rabble rabble");
Delay(talkdelay); break;
Case 1:
NPC_Talk (0.8, 1, "chit chat");
Delay(talkdelay); break;
Case 2:
NPC_Talk (0.8, 1, "babble babble");
Delay(talkdelay); break;
Case 3:
NPC_Talk (0.8, 1, "blah blah");
Delay(talkdelay); break;
Case 4:
NPC_Talk (0.8, 1, "eyjafjallajokull");
Delay(talkdelay/2); SetActorState(105,"Talking",0);
NPC_Talk (0.85, 2, "it's a long long name"); //multiple lines!
Delay(talkdelay); break;
}
break;
}
}
Function void NPC_talk (int whatline, int whichone, str talkertext)
{
LocalAmbientSound("misc/chat",127);
SETFONT("SMALLFONT");
HudMessage(s:talkertext; HUDMSG_PLAIN, whichone, CR_GRAY, 0.0, whatline, 4.5);
}
This is a pretty basic NPC, but it'll do. Modify to your own specifications, and have fun writing funny one-liners.
Two words.Care to elaborate? Charge Kick in Mega Man 5 is actually my favorite weapon, you just have to know what you can slide through or not.
Charge Kick.