ideally i would like to set it up that i can controll exactly how many mortars it shoots, and the timing inbetween actuall shots. this is dirty, but for now it does function, albeit indefinatly.\
looking at it, i suspect resetactioncount also resets count so it never reaches 300, but i need it to reset the angle to random evertime it is about to spawn a mortarline.
action USMORTARFIRE 0 1 1 1 8
action USMORTARLOADING 0 1 1 1 16
useractor notenemy USMORTARSPAWN 0 USMORTARLOADING
cstat 32768
ifaction USMORTARFIRE
ifcount 300 killit
{
ifactioncount 2
{
move 0 0 randomangle
spawn USMORTARLINE
resetactioncount
}
}
ifaction USMORTARLOADING
ifactioncount 120 // when done loading, fire away
{
action USMORTARFIRE // the firing state
}
enda
[edit] resetactioncount seemed to be the culprit, now it starts and stops, though the starting does not respond to the delay i want to set
action USMORTARFIRE 0 1 1 1 16
action USMORTARLOADING 0 1 1 1 16
useractor notenemy USMORTARSPAWN 0 USMORTARLOADING
cstat 32768
ifaction USMORTARFIRE
ifcount 150 killit
{
ifactioncount 2
{
move 0 0 randomangle
ifrnd 64 spawn USMORTARLINE
ifactioncount 40 killit
}
}
ifaction USMORTARLOADING
ifactioncount 120 // when done loading, fire away
{
action USMORTARFIRE // the firing state
}
enda

Help
Duke4.net
DNF #1
Duke 3D #1


