How to activate a container using scripts?

Questions specific to OpenMW-CS can be asked, and content development related topics can be discussed here
Post Reply
kuyondo
Posts: 243
Joined: 29 Mar 2016, 17:45

How to activate a container using scripts?

Post by kuyondo »

So I stumbled across a discussion in Morrowind Modding Discord, and tried this issue myself. stolen_goods is a container ID, only 1 instance exist in the game.

Example console:

Code: Select all

stolen_goods->activate ; does not work
Example script:

Code: Select all

begin test
	if ( player->gethealth 1 )
	stolen_goods->activate ; does not work
	endif
end
Tried using forcegreeting, gives weird buggy results:

Code: Select all

stolen_goods->forcegreeting
; dialogue window opens and cannot close it. Youre stuck here, only way to quit is close the game externally.

but if you use forcegreeting on a valid object first:

Code: Select all

nedhelas->forcegreeting
stolen_goods->forcegreeting
; dialogue window opens and you can close it.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: How to activate a container using scripts?

Post by Zini »

That is a bit confusing. You seem to talk about two different issues here: activating container and use of forcegreeting on a non-actor.

The former is implemented. If it doesn't work for you, please file a bug report (with details on how to reproduce).

The forcegreeting issue also sounds like a bug. You know what to do.
kuyondo
Posts: 243
Joined: 29 Mar 2016, 17:45

Re: How to activate a container using scripts?

Post by kuyondo »

Zini wrote: 03 Aug 2018, 11:37 That is a bit confusing. You seem to talk about two different issues here: activating container and use of forcegreeting on a non-actor.

The former is implemented. If it doesn't work for you, please file a bug report (with details on how to reproduce).

The forcegreeting issue also sounds like a bug. You know what to do.
Sorry bout that, Just stating the consequences of the different methods I tried to use.

All right, I will file 2 bug reports. because there are 2 issues here.
Post Reply