| This is the transcript of a script file, which runs certain tasks in the game upon execution. |
| Details | |
|---|---|
| Type | Decompiled script |
| Editor ID | BarrelCactusScript
|
| Form ID | 0010AB6C |
This script triggers when the player harvests a barrel cactus, adding a barrel cactus fruit to their inventory.
scn BarrelCactusScript
int State
begin onActivate
if State == 0 && GetActionRef == player
player.additem NVFreshBarrelCactusFruit 1
set State to 1
playGroup Forward 1
setdestroyed 1
endif
end
begin onLoad
if State == 0
playGroup Backward 1
elseif State == 1
playGroup Forward 1
endif
end
begin onReset
if State == 1
playgroup Backward 1
set State to 0
setdestroyed 0
endif
end