|
ToyMage Apprentice
Joined: 01 Sep 2005 Posts: 120
|
Posted: Tue Jul 09, 2019 1:30 am
multi sessions & variables |
hi hi,
i'm normally playing multiple sessions, and i set up triggers in a shared package and variables in separate sessions.
shared
trigger "You wear armor" GotArmor=1
trigger "You remove your armor" GotArmor=0
session 1 - Variable GotArmor
session 2 - Variable GotArmor
it seems the when reading off the variable, it is reading off the wrong session?
how do i prevent this? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Tue Jul 09, 2019 11:23 am |
This sounds like a scoping issue.
I presume the setting trying to read is in the shared package?
You need to tell your code which one to look at by offsetting the command to the proper session.
#EXECWINDOW windowname {#SAY what is my @gotArmor}
Something like that might work |
|
_________________ Discord: Shalimarwildcat |
|
|
|
ToyMage Apprentice
Joined: 01 Sep 2005 Posts: 120
|
Posted: Thu Jul 11, 2019 12:15 am |
Hmm.. the trigger is in the shared package, I got the variable "gotarmor" set up in both session.
When I type #SHOW @GotArmor in session 1, it may show 0, but #IF shows and runs as 1 (which is 1 in session 2) |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Fri Jul 12, 2019 7:50 pm |
Is there a copy of the variable in the shared package that could be getting in the way?
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|