Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Incorrect Screen->D[] values when script run at screen init after warp

2 replies · 943 views · Started 13 February 2010

Test quest

The script is just this:

ffc script Test
{
void run()
{
if(Screen->D[0]!=1)
{
Screen->CreateItem(10);
Screen->D[0]=1;
}
}
}

And the FFC has "Run Script at Screen Init" checked.

So, it creates a candle. Go north or west and return, and it doesn't create another. South warps to another DMap on the same map; go south and back, and the candle reappears. If you keep going back and forth, though, it won't show up again. Uncheck the screen init flag, and it works correctly.

I'm not too familiar with the script-related code, but I'd guess it just isn't switching back to the first DMap's Screen->D[] in time when you warp back. Or something like that.