Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] hey <@271350028985958408>, in your old scripts when writing dungeon mobs, you use variables at the t

[DiscordArchive] hey <@271350028985958408>, in your old scripts when writing dungeon mobs, you use variables at the t

[DiscordArchive] hey <@271350028985958408>, in your old scripts when writing dungeon mobs, you use variables at the t

Pages (3): 1 2 3 Next
rektbyfaith
Administrator
0
10-28-2022, 05:30 PM
#1
Archived author: Crow • Posted: 2022-10-28T17:30:40.879000+00:00
Original source

hey <@271350028985958408>, in your old scripts when writing dungeon mobs, you use variables at the top that look like tables, and say
dungeon name = {}
dungeonname.VAR = {}

is that how you differentiate instance ids? and is that relevant to eluna now or redundant?
rektbyfaith
10-28-2022, 05:30 PM #1

Archived author: Crow • Posted: 2022-10-28T17:30:40.879000+00:00
Original source

hey <@271350028985958408>, in your old scripts when writing dungeon mobs, you use variables at the top that look like tables, and say
dungeon name = {}
dungeonname.VAR = {}

is that how you differentiate instance ids? and is that relevant to eluna now or redundant?

rektbyfaith
Administrator
0
10-28-2022, 05:32 PM
#2
Archived author: stoneharry • Posted: 2022-10-28T17:32:57.893000+00:00
Original source

There's an extension that handles storing data by map and instance ID for you now, i.e: `unit:GetData("key", value)` and `unit:SetData("key", value)`

If you try to key your table by instance ID still that is fine, but bear in mind instance IDs can be reused after a dungeon is reset
rektbyfaith
10-28-2022, 05:32 PM #2

Archived author: stoneharry • Posted: 2022-10-28T17:32:57.893000+00:00
Original source

There's an extension that handles storing data by map and instance ID for you now, i.e: `unit:GetData("key", value)` and `unit:SetData("key", value)`

If you try to key your table by instance ID still that is fine, but bear in mind instance IDs can be reused after a dungeon is reset

rektbyfaith
Administrator
0
10-28-2022, 05:36 PM
#3
Archived author: Crow • Posted: 2022-10-28T17:36:32.093000+00:00
Original source

oh well, wouldnt you just reset the data when you when bosses die or events are over?
rektbyfaith
10-28-2022, 05:36 PM #3

Archived author: Crow • Posted: 2022-10-28T17:36:32.093000+00:00
Original source

oh well, wouldnt you just reset the data when you when bosses die or events are over?

rektbyfaith
Administrator
0
10-28-2022, 05:37 PM
#4
Archived author: Foe • Posted: 2022-10-28T17:37:36.694000+00:00
Original source

Not necessarily
rektbyfaith
10-28-2022, 05:37 PM #4

Archived author: Foe • Posted: 2022-10-28T17:37:36.694000+00:00
Original source

Not necessarily

rektbyfaith
Administrator
0
10-28-2022, 05:38 PM
#5
Archived author: Foe • Posted: 2022-10-28T17:38:05.456000+00:00
Original source

Some dungeons you want to track progress through the dungeon as an example. It doesn't make sense to reset the data when the boss is dead, but when the instance is deinstantiated
rektbyfaith
10-28-2022, 05:38 PM #5

Archived author: Foe • Posted: 2022-10-28T17:38:05.456000+00:00
Original source

Some dungeons you want to track progress through the dungeon as an example. It doesn't make sense to reset the data when the boss is dead, but when the instance is deinstantiated

rektbyfaith
Administrator
0
10-28-2022, 05:38 PM
#6
Archived author: Foe • Posted: 2022-10-28T17:38:32.011000+00:00
Original source

If you leave the dungeon as an example then go back to it, you want it to keep track of whatever progression data from your previous visit
rektbyfaith
10-28-2022, 05:38 PM #6

Archived author: Foe • Posted: 2022-10-28T17:38:32.011000+00:00
Original source

If you leave the dungeon as an example then go back to it, you want it to keep track of whatever progression data from your previous visit

rektbyfaith
Administrator
0
10-28-2022, 05:38 PM
#7
Archived author: Foe • Posted: 2022-10-28T17:38:51.698000+00:00
Original source

It's much cleaner to create the storage on dungeon creation, then remove it on dungeon deinstantiation
rektbyfaith
10-28-2022, 05:38 PM #7

Archived author: Foe • Posted: 2022-10-28T17:38:51.698000+00:00
Original source

It's much cleaner to create the storage on dungeon creation, then remove it on dungeon deinstantiation

rektbyfaith
Administrator
0
10-28-2022, 05:39 PM
#8
Archived author: Crow • Posted: 2022-10-28T17:39:58.427000+00:00
Original source

and how precisely does one do that
rektbyfaith
10-28-2022, 05:39 PM #8

Archived author: Crow • Posted: 2022-10-28T17:39:58.427000+00:00
Original source

and how precisely does one do that

rektbyfaith
Administrator
0
10-28-2022, 05:41 PM
#9
Archived author: Foe • Posted: 2022-10-28T17:41:37.712000+00:00
Original source

GetData and SetData is a good way to do it on a creature level, I don't remember if you can do it on an instance object. Generally you'd have two functions, one for when a dungeon is created and one for when the dungeon is destroyed. In the dungeon created function you'd write to a script-scope table and use the instance ID as key. On destruction you'd nil that table entry based on same instance ID
rektbyfaith
10-28-2022, 05:41 PM #9

Archived author: Foe • Posted: 2022-10-28T17:41:37.712000+00:00
Original source

GetData and SetData is a good way to do it on a creature level, I don't remember if you can do it on an instance object. Generally you'd have two functions, one for when a dungeon is created and one for when the dungeon is destroyed. In the dungeon created function you'd write to a script-scope table and use the instance ID as key. On destruction you'd nil that table entry based on same instance ID

rektbyfaith
Administrator
0
10-28-2022, 05:43 PM
#10
Archived author: Foe • Posted: 2022-10-28T17:43:06.489000+00:00
Original source

Actually you don't even need to update on destruction, you'd just use the initialize function and always overwrite any previous data tied to that instance ID
rektbyfaith
10-28-2022, 05:43 PM #10

Archived author: Foe • Posted: 2022-10-28T17:43:06.489000+00:00
Original source

Actually you don't even need to update on destruction, you'd just use the initialize function and always overwrite any previous data tied to that instance ID

Pages (3): 1 2 3 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)