Jump to content

ActionOverride -- what's an actor?


Luiz

Recommended Posts

Sayeth the IESDP: ActionOverride(O:Actor*,A:Action*)

 

What exactly is the type used for actor? .CRE file name, Death Variable, name of critter/character, name of script critter/character is running?

 

I can get ActionOverride working for in-party members (using Player1, Player2, etc) but can't figure out the correct way of identifying non-party actors to affect with this action. Forgive me if this is a dumb question but it's driving me :)

 

Cheers,

Luiz.

Link to comment

I should have posted sooner and saved myself the frustration. Thanks very much for the prompt replies. I have just got it working using a DV ... now that I'm actually spelling the DV correctly. :)

 

However, a script name doesn't seem to work for me. Is there a problem if the ActionOverride(NameOfScript, Action) is called inside the script: NameOfScript?

 

e.g.

NPCBLAHBLAH.BAF:

IF
NumTimesTalkedTo(0)
THEN
RESPONSE #100
	ActionOverride("NPCBLAHBLAH",MoveToObject(Player1))
	Wait(1)
	FaceObject(Player1)
END

 

While I'm logged, a couple of other .D questions if you don't mind:

 

1. If, in a dialog, I want to make certain responses available under certain conditions pertaining to the PC, what "Object" ID should be used for the PC check. I've been using "Protagonist". Is this correct or should some other ID be used? Is there any functional difference between "Player1" and "Protagonist"?

 

e.g.

 

IF ~CheckStatLT(Protagonist,14,INT)~ THEN ~I'm not the sharpest blade in the spoon drawer.~ GOTO NoYouAreNot

 

2. If making multiple different checks, does it matter what order they are made in? Should they all be at the bottom of the response list? Does a prior check prevent later checks from being made?

 

e.g. Will both MAGE_ALL options appear if the PC is a mage? Would it matter if they were listed earlier in the list? ...

 

IF ~~ THEN BEGIN FM.21
SAY ~Actually loud noise bothers me a great deal. I have very sensitive ears. You should take care with your ears, y'know. Explosions and whatnot. Pffft! Imagine if you lost your hearing! You'd never enjoy songs and music again, nor a lover whispering sweet nothings in your ear, nor the joyous laughter of your grandchildren. Just stop and think before next you go blowing things up!~
++ ~It's not as if I had any choice in the matter! I'd just stumbled out of the collapsing lair of some mad wizard who was torturing me, only to have a dear friend kidnapped before my very eyes.~ + FM.4
++ ~Excuse me, good lady, but it was hardly my intention to be caught at the centre of such a disturbance. The circumstances that caused all that troubling noise were... far beyond my control.~ + FM.1
++ ~Fine lecture. Now bugger off.~ + FM.24
++ ~I couldn't agree more. The racket was not of my making, but please accept my apologies. There are things you are not aware of.~ + FM.1
++ ~I'm really not in the mood for speeches gnome, as well intentioned as they may be. It's been a hell of a day so far, and the day is still young.~ + FM.23
+ ~Class(Protagonist,BARD)~ + ~Lady, you hardly need convince one in my profession how priceless the gift of hearing be. ~ + FM.22
+ ~Class(Protagonist,MAGE_ALL)~ + ~I know a great deal about blowing things up, so don't lecture me.~ + FM.22
+ ~Class(Protagonist,MAGE_ALL)~ + ~Believe me, I'm thinking very hard about blowing up something else right now!~ + FM.22
END

 

 

Cheers,

Luiz - who should just stick to making kits.

Link to comment

ActionOverride will not work for the "primary actor" : that is, if Branwen's script is performing, you cannot use ActionOverride on Branwen, only on Dynaheir or Skie. (As an example). Just use MoveToObject(Player1), it should work.

 

1. If, in a dialog, I want to make certain responses available under certain conditions pertaining to the PC, what "Object" ID should be used for the PC check. I've been using "Protagonist". Is this correct or should some other ID be used? Is there any functional difference between "Player1" and "Protagonist"?

 

Since Player1 worked in all mods I've been making, I never bothered to look up anything else. :)

Link to comment
e.g. Will both MAGE_ALL options appear if the PC is a mage? Would it matter if they were listed earlier in the list? ...

 

It will all work regardless, except that I don't know about Protagonist. It sounds too long for my liking: and since it's longer than 8 symbols, it might not work.

Link to comment

Right, "Player1" is it from now on. :love:

 

One last stupid question (for today) ...

 

When moving from a BEGIN-END dialog block which has only SAY but no REPLYs, to another BEGIN-END dialog block, is there a more elegant way of doing so other than "IF ~~ THEN GOTO xyz"? The old school PASCAL programmer in me gets twitchy seeing GOTOs all over the place (although the older school BASIC programmer in me is largely untroubled :) ).

 

e.g.

IF ~~ THEN BEGIN Right
SAY ~Yes, that's correct. You see...~
IF ~~ THEN GOTO Exposition
END

IF ~~ THEN BEGIN Wrong
SAY ~No. Actually...~
IF ~~ THEN GOTO Exposition
END

IF ~~ THEN BEGIN Exposition
SAY ~The Council of Six are the governing body, not the Cowled Wizards...

 

Cheers,

Luiz.

Link to comment

This was my first question when I got into modding, too. But, alas...

 

The most "elegant" way up-to-date is

 

IF ~~ Wrong
SAY ~No. Actually...~
IF ~~ + Exposition
END

IF ~~ Exposition
SAY ~The Council of Six are the governing body, not the Cowled Wizards...

Link to comment

Ah, well, the extra abbreviations certainly help reduce clutter. (My NPC joining .D is already over 30 blocks so every little bit helps.)

 

Thank you very much for your help, Kulyok. I think going and peeking under the hood of your fantastic "Xan" to learn more will be time well spent for me. :)

 

Cheers,

Luiz.

Link to comment
However, a script name doesn't seem to work for me. Is there a problem if the ActionOverride(NameOfScript, Action) is called inside the script: NameOfScript?
The actor script name is what you're referring to as a "death variable." It's located at 0x280 in the CRE file.

 

Protagonist was only used by BIS, so you may as well stick to just Player1 (Protagonist should work fine, but BioWare never used it, so why bother).

 

ActionOverride will not work for the "primary actor" : that is, if Branwen's script is performing, you cannot use ActionOverride on Branwen, only on Dynaheir or Skie. (As an example). Just use MoveToObject(Player1), it should work.
It should work, but it will dump the actor's action queue, causing it to get stuck on MoveToObject() (even in cases where MoveToObject() wouldn't do anything). So yeah, there shouldn't ever be a reason to ActionOverride() the script runner from their own script.
Link to comment

OK. I got confused by the nomenclature of Death Variable. It's a weird label in the first place, but I was employing that term to distinguish from the example where I tried an ActionOverride(NPCJoiningScript,Action) from within the NPCJoiningScript.BAF/BCS.

 

Now I know you cannot/shouldn't use ActionOverride upon the "self" of the script, and have used the direct actions such as MoveToObject instead. Working very well. Nice.

 

The whole "Death Variable" thing is still not clear in my own mind, though. It's a special kind of identifier, but of the actor itself (and the actor's existance), and not of a script associated with them, right?

 

I used Protagonist as initially I hadn't ascertained the difference between PlayerX and PlayerXFill and was afraid of it marking the character in the Player1 slot, rather than the - well - the Protagonist, if you see what I mean. Now that that is also clarified, I'll be good and do things according to Bioware IDs rather than BIS. :)

Link to comment
The whole "Death Variable" thing is still not clear in my own mind, though. It's a special kind of identifier, but of the actor itself (and the actor's existance), and not of a script associated with them, right?
Yes. It's the unique named used to refer to the actor within scripts and dialogues; it doesn't have anything to do with which scripts are running.

 

I used Protagonist as initially I hadn't ascertained the difference between PlayerX and PlayerXFill and was afraid of it marking the character in the Player1 slot, rather than the - well - the Protagonist, if you see what I mean. Now that that is also clarified, I'll be good and do things according to Bioware IDs rather than BIS. ;)
PlayerN refers to the party members based on joined order (so Player1 is always the protagonist, since it's the first character in the party). PlayerNFill refers to the party members based on party order (so Player1Fill is the party member in the first party slot).
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...