HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

local quest update

04-11-2008, 03:44 AM#1
zen87
as the title said, im trying to do some local quest update but it just failed and desync with whatever i did for trying to change the quest string locally for each player (for example, in the main quest of player 1 "you are evil!" and the main quest of player 2 "you are mad!", try something funny and it just boom desync...)

--

any1 has successfully did this? i would need some refrence for how it is done, thank you!
04-11-2008, 04:05 AM#2
Ammorth
I believe local strings will desync as they desync the string table. The work-around? Store your string in a local variable for all players and then only modify the quest locally with the string. This way the strings are always allocated for all players but only used for 1.

Collapse JASS:
function whatever takes nothing returns nothing
    local string s = "This string is created for all players"
    if GetTriggerPlayer() == GetLocalPlayer() then
        call DoStuffWith(s)
    endif
endfunction
04-11-2008, 04:31 AM#3
zen87
O_O i see, alright i'll try that out now, thank you!
04-11-2008, 05:21 AM#4
PandaMine
Yeah same thing happens with text tags apparently. they use a global stack so you need to first make sure that every player has the text tag in the first place before modifying its data for a single player