Jump to content

SetGlobal() does not get performed after JoinParty()


jastey

Recommended Posts

For Imoen's Tutu leaving dialog (_IMOENP.dlg), the following was observed:

 

For action

~JoinParty() SetGlobal("KickedOut","LOCALS",0)~

 

the local varaible was not set. This also happened for GLOBAL, and also for Enemy(), which I chose as an arbitrary other action to proof this behaviour, if added after the JoinParty().

 

To get actions performed upon joining, they have to be set before the JoinParty():

 

~SetGlobal("KickedOut","LOCALS",0) JoinParty()~

works.

Link to comment

You didn't talk about ActionOverride until now, did you :)

 

My guess, which is a little more than guess, is that JoinParty clears the action queue of the actor joined.

So it 'forgets' all actions it still need to perform.

I don't really know why is it so.

Link to comment

Ok, but actionoverride makes the whole stuff different.

As it adds the action to another actor's action queue.

So, a blocking action (like JoinParty turns out to be) won't block the originator's next action.

There are many blocking actions, what you found is, that JoinParty is one too.

(I didn't expect it is).

Link to comment
Ok, but actionoverride makes the whole stuff different.

As it adds the action to another actor's action queue.

Even if it's called from the cre's own dialogue file? That is what confused me, that JoinParty() disables actions that comes afterwards, but if I put ActionOverride("imoen",JoinParty()) into Imoen's dialogue, all actions that follow get performed. For me, that is weird.
Link to comment

Hehe, ok, try this:

Actionoverride(Myself,SetGlobal("test","global",1))

SetGlobal("test","global",2)

 

My theory is that ActionOverride refeeds the action into the action queue, so anything that should go into the same actor's action queue, will be executed after the actor executed the actions already in its queue at the time actionoverride was performed.

 

If actionoverride works like my theory suggests, the variable's value will be 1.

Link to comment
My theory is that ActionOverride refeeds the action into the action queue, so anything that should go into the same actor's action queue, will be executed after the actor executed the actions already in its queue at the time actionoverride was performed.
Sorry, I don't get this :)

 

Well, I tried the above ~ActionOverride("imoen",JoinParty()) SetGlobal("KickedOut","LOCALS",0)~ (EDIT: out of Imoen's dialogue) and in contrary to using JoinParty() directly instead of ActionOverride, with ActionOverride the second action does get performed. Isn't this a contradiction to what you just said?

Link to comment
Actionoverride(Myself,SetGlobal("test","global",1))

SetGlobal("test","global",2)

Wait, I think I got what you mean, you say the setting to 1 will be performed after the setting to 2.

 

Well, we had problems with variables not being set at all, so how would I know the variable was at 2 in the meantime. :)

Link to comment

Actionoverride(Myself,SetGlobal("test","global",1))

SetGlobal("test","global",2)

Wait, I think I got what you mean, you say the setting to 1 will be performed after the setting to 2.

 

Well, we had problems with variables not being set at all, so how would I know the variable was at 2 in the meantime. :)

 

You don't need to know that for this experiment, as you don't have to test if SetGlobal is blocking or not (it isn't).

 

But for the peace of the mind could do this:

 

Actionoverride(Myself,SetGlobal("test","global",1))

SetGlobal("test","global",2)

SetGlobal("another","global",2)

 

This will perform: test=2, another=2, and test=1. Resulting in test=1, another=2

Link to comment

Archived

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

×
×
  • Create New...