Aller au contenu

Photo

Simple OnPerceived - and the woes of ActionSpeakString


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Buddywarrior

Buddywarrior
  • Members
  • 256 messages

Thoughts why I can't get NPCs to run the following code in OnPerceived?

 

 
//Goes OnPerceived of a creature
void main()
{
 
object oPC = GetLastPerceived();
 
if (!GetIsPC(oPC)) return;
 
if (!GetLastPerceptionSeen()) return;
ActionSpeakString("Something to say here!", TALKVOLUME_TALK);
 
}
 

 

I can't get it to work, but if I swap out ActionSpeakString with FloatingTextStringOnCreature("Make the PC talk", oPC);, it works fine. I've tried FloatingTextStringOnCreature("Make the PC talk", OBJECT_SELF) but that isn't making the bugger speak either.



#2
Shadooow

Shadooow
  • Members
  • 4 470 messages

replace with SpeakString

 

the proble is in the action again, NPC probably initiates the combat which clears the action queve



#3
Buddywarrior

Buddywarrior
  • Members
  • 256 messages

OH my gosh. Perfect. I can't praise you enough, thanks Shadooow.