- spawnstatenumber: this would determine what value to look for in order to carry out the jump
- Statename: what state to jump to when the "state number" parameter equals the called value
- Transfer sprite frame: situations where it'd be overlayed would use this. It'd be a boolean value.
- Weapon.spawnlevel: this actor property is basically used by the 'spawnstatenumber" value of this function in much the same way A_SelectPiece uses the "health" property.
Code: Select all
Actor NNSigil : weapon replaces Sigil
{
Weapon.Kickback 100
Weapon.SelectionOrder 4000
+FLOORCLIP
+WEAPON.CHEATNOTWEAPON
+WEAPON.NOAUTOAIM
Inventory.PickupSound "weapons/sigilcharge"
Weapon.spawnlevel 1
Tag "$TAG_SIGIL" // "SIGIL"
Inventory.PickupMessage "$TXT_SIGIL" // "You picked up the SIGIL."
States
{
Deselect:
"----" A 1 Bright A_Lower(6)
Loop
Select:
TNT1 A 1 Bright
{
If(CallACS("NNSigilPieceCount")==5)
{
a_overlay(2,"Viewlevel5");
}
If(CallACS("NNSigilPieceCount")==4)
{
a_overlay(2,"Viewlevel4");
}
If(CallACS("NNSigilPieceCount")==3)
{
a_overlay(2,"Viewlevel3");
}
If(CallACS("NNSigilPieceCount")==2)
{
a_overlay(2,"Viewlevel2");
}
If(CallACS("NNSigilPieceCount")==1)
{
a_overlay(2,"Viewlevel1");
}
A_Raise(6);
}
goto ready
Viewlevel1:
SIGH A -1
stop
Viewlevel2:
SIGH B -1
stop
Viewlevel3:
SIGH C -1
stop
Viewlevel4:
SIGH D -1
stop
Viewlevel5:
SIGH E -1
stop
Ready://Well, it seems using "----" A in 'Ready' makes ZDoom refuse to give you the item. Interesting.
SIGH "#" 1 Bright
{
If(CallACS("NNSigilPieceCount")==5)
{
a_overlay(2,"Viewlevel5");
}
If(CallACS("NNSigilPieceCount")==4)
{
a_overlay(2,"Viewlevel4");
}
If(CallACS("NNSigilPieceCount")==3)
{
a_overlay(2,"Viewlevel3");
}
If(CallACS("NNSigilPieceCount")==2)
{
a_overlay(2,"Viewlevel2");
}
If(CallACS("NNSigilPieceCount")==1)
{
a_overlay(2,"Viewlevel1");
}
WeaponReady(0);
}
Loop
Fire:
TNT1 A 18 Bright
{
if((CallACS("NNSigilPieceCount")==1)
{
a_overlay(2,"Fire1");
}
if((CallACS("NNSigilPieceCount")==2)
{
a_overlay(2,"Fire2");
}
if((CallACS("NNSigilPieceCount")==3)
{
a_overlay(2,"Fire3");
}
if((CallACS("NNSigilPieceCount")==4)
{
a_overlay(2,"Fire4");
}
if((CallACS("NNSigilPieceCount")==5)
{
a_overlay(2,"Fire5");
}
A_PlaySound("weapons/sigilcharge",CHAN_WEAPON,1.0,false,attn_norm,false);
A_Light(2);
}
TNT1 A 3 Bright A_GunFlash("Flash",0)
TNT1 A 10 A_PlaySound("weapons/sigilcharge",CHAN_WEAPON,1.0,false,attn_norm,false)
TNT1 A 5
Goto Ready
Fire1:
SIGH A 18
SIGH A 3
SIGH A 10
{
A_Fireprojectile("NNSigilLightningSpot",0.0,false,0.0,0.0,0,0.0);
A_DamageSelf(4,"SIGIL",0,"none","none",aaptr_default,aaptr_null);
}
SIGH A 5
stop
Fire2:
SIGH B 18
SIGH B 3
SIGH B 10
{
A_Fireprojectile("NNSpectralLightningH1",0.0,false,0.0,0.0,0,0.0);
A_DamageSelf(8,"SIGIL",0,"none","none",aaptr_default,aaptr_null);
}
SIGH B 5
stop
Fire3:
SIGH C 18
SIGH C 3
SIGH C 10
{
A_Fireprojectile("NNSigil3AttackCounter",0.0,false,0.0,0.0,0,0.0);
A_DamageSelf(12,"SIGIL",0,"none","none",aaptr_default,aaptr_null);
}
SIGH C 5
Goto Ready
Fire4:
SIGH D 18
SIGH D 3
SIGH D 10
{
A_Fireprojectile("NNSigilLightningBigV",0.0,false,0.0,0.0,0,0.0);
A_DamageSelf(16,"SIGIL",0,"none","none",aaptr_default,aaptr_null);
}
SIGH D 5
stop
Fire5:
SIGH E 18
SIGH E 3
SIGH E 10
{
A_Fireprojectile("NNSpectralLightningBigBall1",0.0,false,0.0,0.0,0,0.0);
A_DamageSelf(20,"SIGIL",0,"none","none",aaptr_default,aaptr_null);
}
SIGH E 5
stop
Fire6:
SIGH E 18 Bright
{
A_PlaySound("weapons/sigilcharge",CHAN_WEAPON,1.0,false,attn_norm,false);
A_Light(2);
}
SIGH E 3 Bright A_GunFlash("Flash",0)
SIGH E 10
{
A_Fireprojectile("NNSpectralLightningBigBall1",0.0,false,0.0,0.0,0,0.0);
A_DamageSelf(20,"SIGIL",0,"none","none",aaptr_default,aaptr_null);
A_PlaySound("weapons/sigilcharge",CHAN_WEAPON,1.0,false,attn_norm,false);
A_Fireprojectile("NNSigil3AttackCounter",0.0,false,0.0,0.0,0,0.0);
A_Fireprojectile("NNSpectralLightningH1",0.0,false,0.0,0.0,0,0.0);
A_Fireprojectile("NNSigilLightningSpot",0.0,false,0.0,0.0,0,0.0);
A_Fireprojectile("NNSigilLightningBigV",0.0,false,0.0,0.0,0,0.0);
}
SIGH E 5
Goto Ready
Flash:
SIGF A 4 Bright A_Light(2)
SIGF B 6 Bright A_Light(0x80000000)
SIGF C 4 Bright A_Light(1)
TNT1 A 0 A_Light(0)
Stop
Spawn:
SIGL "#" -1 nodelay
{
return A_SetSpawnState(1,"Spawn1",true);
return A_SetSpawnState(2,"Spawn2",true);
return A_SetSpawnState(3,"Spawn3",true);
return A_SetSpawnState(4,"Spawn4",true);
return A_SetSpawnState(5,"Spawn5",true);
}
Stop
Spawn1:
"####" A -1
Stop
Spawn2:
"####" B -1
Stop
Spawn3:
"####" C -1
Stop
Spawn4:
"####" D -1
Stop
Spawn5:
"####" E -1
Stop
}
}
ACTOR NNSigil1 : NNSigil replaces sigil1 77
{
game strife
Inventory.Icon "I_SGL1"
Weapon.spawnlevel 1
ConversationID 196, 190, 194
}
ACTOR NNSigil2 : NNSigil replaces sigil2 78
{
game strife
Inventory.Icon "I_SGL2"
Weapon.spawnlevel 2
ConversationID 197, 191, 195
}
ACTOR NNSigil3 : NNSigil replaces sigil3 79
{
game strife
Inventory.Icon "I_SGL3"
Weapon.spawnlevel 3
ConversationID 198, 192, 196
}
ACTOR NNSigil4 : NNSigil replaces sigil4 80
{
game strife
Inventory.Icon "I_SGL4"
Weapon.spawnlevel 4
ConversationID 199, 193, 197
}
ACTOR NNSigil5 : NNSigil replaces sigil5 81
{
game strife
Inventory.Icon "I_SGL5"
Weapon.spawnlevel 5
ConversationID 200, 194, 198
}