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

[864]Script effect weares off.

10 replies · 1,862 views · Started 24 October 2008

When I was testing a custom, scripted item, the sword and item jinxes wore off when I walked to the next screen. I put the script below in the action script tab, it's meant to set a jinx for 20 seconds, but just as soon as you walk to another screen, the affect wears off.
Script:

import "std.zh"

item script bugtest{
void run(){
Link->SwordJinx = 1200;
}
}


Test quest:
Download Here

I'm getting this, too, but it's possible that item scripts only work on the current board. Anyone else confirm this?

I'm trying to remember if jinxes were supposed to carry over in normal LOZ. I'm thinking yes, in which case this would be a bug, but I'm unsure.

The Zelda Classic code explicitly removes temporary curses every time Link leaves a screen by any method. Unless it's been NES-inconsistent all these long years... not a bug!

I strictly remember having to hunt down a blue bubble multiple screens away to get unjinxed in the 2nd quest, granted I only ever played up to the 3rd dungeon since I couldnt find any others o_O. that was ages ago though so it would be nice to have someone with the cartridge to test it.

do note that red bubbles only exist in the 2nd quest IIRC.

Um, we're referring to temporary jinxes.

...

Well, it (no temp. jinx carryover) certainly seems positive in emulation. Take that as you will.

In this case, you will need to make a global variable to hold your jinx time. When you set this variable, set the jinx on Link to -1 (permanent jinx). Then, every frame, if the global variable you created is above 0, decrement it by 1. When it hits 1, just before you decrement it the final time to make it 0, release the jinx on Link (set the jinx to 0). The issue with this is, if Link hits a temp bubble, the jinx becomes temporary and wears off after normal bubble jinx time. Hitting a release bubble releases the jinx immediately. If you don't want this to happen, then, every frame, if you global jinx variable is above 0, then set the jinx on Link to -1. This will manually override bubble jinxes when you want to set a manual one.

import "std.zh"

int Jinxtimer = 1200;

item script bugtest{
void run(){
for(; Jinxtimer > 0; Jinxtimer--){
Link->SwordJinx = -1;
Waitframe();
}
Link->SwordJinx = 0;
}
}

if you don't want Link's jinx to be curable, or

import "std.zh"

int Jinxtimer = 1200;

item script bugtest{
void run(){
Link->SwordJinx = -1;
for(; Jinxtimer > 0; Jinxtimer--){
Waitframe();
if (Link->SwordJinx == 0)
Jinxtimer = 0;
}
Link->SwordJinx = 0;
}
}

if you do. Does this help?

EDIT: Just reiterating what DN said (above post) through code