Jump to content

Troubles with Invisible Activators and a very simple script


cyrus224

Recommended Posts

I have created a simple voice acted companion. I want to make it so when you enter certain locations, he says certain things.

 

I have tried several times to create activators, I have created my own, and copied others. When I move them into the reference window, it says that there is 1 count being used, but it does not show up. It is not visible, nor mentioned in the Cell View window.

 

 

Second, Everytime I try to make a script that would function alongside it, it won't save. I know NOTHING about scripting but so far I have (Bcom is the companion)

 

scn BcomActFreeside001

short bcomActFreeside

begin OnTriggerEnter player
if bBcomHired == 1
bcomActFreeside == 1
endif

end

 

honestly I do not even knwo where I am going with it. I am hoping to make it so when you enter that space, that script checks to see if that companion is with you, if he is, he will say his one line, and my next line of script will tell it not to run again.

 

I can't seem to get this to funciton no matter what I do. One, becuase I know nothing about scripting, and 2 becuase I cannot make an activator work.

 

Can someone please help? I would be forever grateful. To break it down, I need to know how to make an activator (or something else that will do the job?) that will bring up a script. I then need a script that says "is this companion with you? If he is, this dialouge will be said (while still walking, not entering into dialouge menu) and then the script says not to run again. Once I have this, I can basicly copy and paste this as many times as I want across the wasteland.

Link to comment
Share on other sites

Your script doesn't save probably because the compiler can't find bBcomHired anywhere. You need to specify in the script where this variable is declared.

 

If in a quest, then you need to add as prefix the Editor ID of the quest:

if EditorID.bBcomHired == 1

 

Or, if in an object (your companion, for example), then you need to add as prefix the Reference ID of the object:

if ReferenceID.bBcomHired == 1

 

As for the activator, first create a new activator in World Objects > Activator and make it use your script.

Then, in the render window, create a Cubic Activator, set its measurements, and when the Activator window pops, select your activator from the ID dropbox.

 

As for making the companion say a dialogue line outside dialogue, use the SayTo function. Your script should look like:

scn	BcomActFreeside001

short	bcomActFreeside

begin OnTriggerEnter player

	if [Reference/Editor ID].bBcomHired == 1
		if bcomActFreeside == 0
			set bcomActFreeside to 1
			[Reference ID].SayTo player [Topic]
		endif
	endif

end
Link to comment
Share on other sites

I'd add an additional check to that (well, I might add a few more depending on where/what he's saying and when, but this is what the devs do for the vanillas). You want to capture not just if the companion is hired (cuz he could be hired and sitting across the map doing nothing), but if he is actually there with the player when the player hits the trigger. The devs do that with their activator triggered comments for the vanilla companions by checking for hired == 1 and waiting == 0, the assumption being if the companion is hired and not waiting he must be following the player.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...