So I finally dug into scripting to try to make use of screens, but I'm confused about a few things:
1. Changedrawmethod (and Setdrawmethod) functions always on NULL()
In practice, do the above drawmethods always use NULL() for the scr parameter? The reference manual says they can be applied to any entity, but I tried to apply them to both a sprite and a separate screen containing that sprite (followed by drawing them to the main screen), but that resulted in highly distorted or non-existent image. Is that normal? If it is, then when would you ever use drawmethods on other kinds of entities besides the main screen / NULL?
I looked at both Damon Caskey's World Heroes Timeless airship scripts and the Avengers United Battle Force zoom scripts and they both seem to use drawmethods with NULL() only.
And how come changing a changedrawmethod(NULL) property only affects the thing you're drawing to the screen and not the rest of the main screen?
2. Referencing things created from a file / Entity pointers
I would like to get the handle/reference to a background layer that I created with the bglayer command in the level's txt file. Is that possible? Or do I need to skip the txt file entirely and manually loadsprite the image from within the script?
Essentially, I have an affine bglayer that I want to stack 20x with each layer separated by 1px of z height. I tried to do that purely thru bglayer commands in the level's txt file, but the whole game became unplayably slow. So I thought I could use screens to just redraw that bglayer 'entity' (?) 20x without having to calculate the affine effect on each new one. But I don't seem to be able to find the reference to that bglayer from the script. Is that possible? (All openbor docs are painfully thin on the sprite/entity arrays as well)
And what do you think would be the best way to repeat an affine layer 20x without slowing down the game?
3. Why is everyone using drawspriteq and drawscreenq when those functions aren't even in the manual? Is there something better?
1. Changedrawmethod (and Setdrawmethod) functions always on NULL()
In practice, do the above drawmethods always use NULL() for the scr parameter? The reference manual says they can be applied to any entity, but I tried to apply them to both a sprite and a separate screen containing that sprite (followed by drawing them to the main screen), but that resulted in highly distorted or non-existent image. Is that normal? If it is, then when would you ever use drawmethods on other kinds of entities besides the main screen / NULL?
I looked at both Damon Caskey's World Heroes Timeless airship scripts and the Avengers United Battle Force zoom scripts and they both seem to use drawmethods with NULL() only.
And how come changing a changedrawmethod(NULL) property only affects the thing you're drawing to the screen and not the rest of the main screen?
2. Referencing things created from a file / Entity pointers
I would like to get the handle/reference to a background layer that I created with the bglayer command in the level's txt file. Is that possible? Or do I need to skip the txt file entirely and manually loadsprite the image from within the script?
Essentially, I have an affine bglayer that I want to stack 20x with each layer separated by 1px of z height. I tried to do that purely thru bglayer commands in the level's txt file, but the whole game became unplayably slow. So I thought I could use screens to just redraw that bglayer 'entity' (?) 20x without having to calculate the affine effect on each new one. But I don't seem to be able to find the reference to that bglayer from the script. Is that possible? (All openbor docs are painfully thin on the sprite/entity arrays as well)
And what do you think would be the best way to repeat an affine layer 20x without slowing down the game?
3. Why is everyone using drawspriteq and drawscreenq when those functions aren't even in the manual? Is there something better?
Last edited: