Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Holy crap, if I would start making my mod now I could probably use way more ZScript. But I'm deep down into ACS right now so I won't bother changing all the PickActors, variables etc.
So if I see correctly, LineAttack returns an actor if it hits one.
Perhaps LineAttack or LineTarget can help with the autoaim railgun I'm still pondering over...?
Anyway, for now, is there a known method for setting the Bright keyword on the current frame, so that it can be done conditionally? Likewise, can a dynamic light be attached with a function? It seems like it would be cleaner than having to jump to different frames or states if that's all I want to change. If the current sprite can be changed, I just thought perhaps the Bright or the Light could also be changed?
Came up with another question... is there yet an established method for ZScript to perform actions upon starting the level? Like an analogue to ACS OPEN scripts?
Is it possible to position something in the same resolution as whatever the current user's resolution is, BUT have the graphic always RENDER at a fixed resolution, say 320x200? So for example, if the user is using 1920x1080, the draw canvas would have more precision for you to position the object, but the graphic that's blitted to the screen should always look blocky like as if the screen was 320x200.
Use VirtualWidth and VirtualHeight, and just calculate fractional offsets based on the real resolution. (x,y are doubles, as well as VirtualWidthF/VirtualHeightF)
Note: don't forget to DTA_KeepRatio.
If you mean the wiki: Nope, and I have no intention of doing any until the next GZDoom version is released. But you can find examples of it scattered throughout the menu code.
Vaecrius: everything in the menu code uses that stuff (everything inside zscript/menu/ and DrawTextureTags inside zscript/base.txt )... as for HOW to actually use them... well, trial and error I guess. >_<
Unfortunately the only way to draw things correctly is either through Menus or through a Powerup. If you try to draw from an actor, your text will flicker because the actor tick only runs at 35Hz.
So to bump an earlier question: how do you get something to target a dead player even after the player has respawned and not switch over to the respawned player?
EDIT: How do you use the Used() virtual function? It doesn't seem to do anything when I try to "use" a modified actor and I have no idea what else needs to be added.
added a virtual 'used' method that gets called when the player presses use on an actor. This method will only be called if the actor does not have the USESPECIAL flag - that one will be handled as before.
So maybe remove the USESPECIAL flag, if it has one?
I've been really wanting to ask this. How powerful is ZScript? Is it able to manipulate the monsters' movements instead of them going straightly towards the player while walking on left to right a little and shoot from time to time?
Can someone please tell what notable things ZScript can do? Thanks.