Aller au contenu

Photo

Newbie question regarding actions scripting


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

#1
el.sombrero

el.sombrero
  • Members
  • 100 messages
 Hey guys, reaaaaally newbie this one.
 What should I do to make a script run an action? I've tried to inser the action comand line at my script, but I'm receiving an unkow state in compiler error. I think I need to associate the action with its object, but I dont know how.
 Bellow goes my script.
 Cheers

void main(){
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
SetCutsceneMode(oPC, TRUE);
SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA);actionActionMoveToObject(rei, FALSE, fRange=1.0f);
}

#2
MarshallV

MarshallV
  • Members
  • 43 messages
Check out: AssignCommand

#3
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA);actionActionMoveToObject(rei, FALSE, fRange=1.0f);

should be

SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA);
AssignCommand(oPC, ActionMoveToObject(rei, FALSE));

and you need to define the object 'rei' somehow:
object rei = GetNearestObjectByTag("rei");

#4
el.sombrero

el.sombrero
  • Members
  • 100 messages
Red Stripes and Marshall... thx! problem solved!
by the way. I'm trying to change the mood state of some npc (need them to cheer, clap hands or something like that)... but didint find anything like that at their "behavior" properties. Any tip?

#5
Tchos

Tchos
  • Members
  • 5 083 messages
You can set them to play certain animations, or play their voice emotes, but if you want to just set a "mood" property, then you'd have to build a little system around that.

List of "voice chat" emotes, using the PlayVoiceChat command:
http://nwn.wikia.com/wiki/VOICE_CHAT_*

Also, a list of the animations you can select to play using the PlayCustomAnimation command:
http://nwn2.wikia.co...t_of_animations

Modifié par Tchos, 12 novembre 2012 - 01:51 .