As in, have the projectile at the exact same screen coordinates no matter where the camera is? Don't believe you can do that with a normal projectile (which you really shouldn't be using anyway), but you can use a helper.
You'd need to constantly check/set the Pos of the Helper and set it according to GameWidth and GameHeight. I think you'd also need to use ScreenPos to do the necessary math.
The X portion should be easy since the value is always relative to the center of the screen; it's the Y pos that's going to be a bit trickier since it's always relative to the stage floor and we have no StageHeight trigger.
However, if we get the ScreenPos at Time = 0 (say, in a helper) while the Y Pos is 0, we can calculate the height in pixels from the bottom of the screen, effectively giving us the StageHeight we need:
[State x, VarSet]
type = VarSet
trigger1 = Time = 0
var(x) = GameHeight - ScreenPos Y
Using var(x) (where x is whatever variable number you want it to be), you should be able to do a PosSet for Y anywhere on the screen using a combination of Pos Y and ScreenPos Y.
As in, have the projectile at the exact same screen coordinates no matter where the camera is? Don't believe you can do that with a normal projectile (which you really shouldn't be using anyway), but you can use a helper.
You'd need to constantly check/set the Pos of the Helper and set it according to GameWidth and GameHeight. I think you'd also need to use ScreenPos to do the necessary math.
The X portion should be easy since the value is always relative to the center of the screen; it's the Y pos that's going to be a bit trickier since it's always relative to the stage floor and we have no StageHeight trigger.
However, if we get the ScreenPos at Time = 0 (say, in a helper) while the Y Pos is 0, we can calculate the height in pixels from the bottom of the screen, effectively giving us the StageHeight we need:
[State x, VarSet]
type = VarSet
trigger1 = Time = 0
var(x) = GameHeight - ScreenPos Y
Using var(x) (where x is whatever variable number you want it to be), you should be able to do a PosSet for Y anywhere on the screen using a combination of Pos Y and ScreenPos Y.
But if I use the var as the y value in the PosSet sctrl, an error message appears : "Waring: expression truncated to integer" and the projectiles are still affected by the camera movement.
[State 305, VarSet]
type = VarSet
trigger1 = Time = 0
trigger1 = ishelper
var(2) = GameHeight - ScreenPos Y
[state 305]
type=PosSet
trigger1=1
y=var(2)
Am I doing something wrong?