EDuke32 Scripting "CON coding help"
#3362 Posted 22 September 2023 - 02:54 PM
If it starts with 32768 it's staying invisible
If it starts with 0 it's staying visible
#3363 Posted 25 September 2023 - 01:36 AM
I dunno if it's a trick about some player member i'm not aware of, or it's done by manipulating extbits or stuff like that. For sure I saw controller movement is turned off when in-game menus/datapads are on in AA or AMC iirc, but i have no clue on how to search for the solution.
This post has been edited by RichardStorm: 25 September 2023 - 01:37 AM
#3365 Posted 25 September 2023 - 10:56 AM
#3366 Posted 26 September 2023 - 07:15 AM
#3367 Posted 27 September 2023 - 12:17 PM
RichardStorm, on 26 September 2023 - 07:15 AM, said:
Yep, I was going to say something but you guys seemed happy with the solution so I stayed quiet.
The actual solution is to set the fvel and svel members of the input struct to 0 in EVENT_PROCESSINPUT:
https://wiki.eduke32...ructure_members
#3369 Posted 05 October 2023 - 07:45 AM
Is there anyone out here who would like to tackle this request? I could Paypal you some pizza money for the effort.
This post has been edited by Mark: 05 October 2023 - 09:36 AM
#3370 Posted 05 October 2023 - 12:23 PM
Mark, on 05 October 2023 - 07:45 AM, said:
Is there anyone out here who would like to tackle this request? I could Paypal you some pizza money for the effort.
So what is it that you want changed on the light exactly that isn't the radius? Because IIRC polymer doesn't specifically have an intensity value that is independent of the radius.
This post has been edited by Danukem: 05 October 2023 - 12:28 PM
#3371 Posted 05 October 2023 - 01:42 PM
#3372 Posted 06 October 2023 - 10:48 AM
I'm guessing curiosity might eventually make me pursue the intensity option ( I'll likely need help with that ) but for now I'll enjoy what I managed to do.
This post has been edited by Mark: 06 October 2023 - 10:52 AM
#3373 Posted 06 October 2023 - 01:19 PM
#3374 Posted 24 November 2023 - 08:42 PM
#3375 Posted 24 November 2023 - 10:00 PM
Mark, on 24 November 2023 - 08:42 PM, said:
I'm not sure what you are asking. It sounds like you want widescreen to be the default, but what do you want to happen if the player has a non-widescreen resolution?
#3376 Posted 25 November 2023 - 05:53 AM
#3377 Posted 25 November 2023 - 02:34 PM
Mark, on 25 November 2023 - 05:53 AM, said:
Are the tiles in question already being displayed in your project? I can only guess that you have put them in to replace the tiles in the hardcoded display. Is that correct? If that's the case then what you want to do is cancel the hardcoded display events and use your own screen drawing commands to display your own tiles.
#3378 Posted 27 November 2023 - 02:00 PM
#3379 Posted 27 November 2023 - 09:18 PM
jimbob, on 27 November 2023 - 02:00 PM, said:
Make a tile with a keyhole shape cutout or whatever, then you overlay that on the screen in the display event and set the camera position and angle to where you want it, lock the player in place and set up the trigger for unlocking the player and teleporting them. The good news for you is that several released mods have cutscenes like this and more elaborate ones.
#3381 Posted 25 December 2023 - 12:40 PM
I'm using the following code to have debris and gibs land on the ground and stay there.
state getfloordist getactor[THISACTOR].x x getactor[THISACTOR].y y updatesector x y TEMP7 getflorzofslope TEMP7 x y z getactor[THISACTOR].z TEMP8 subvarvar z TEMP8 shiftvarr z 8 subvar z 1 ends
Unfortunately, each time a gib flies out of map bounds, this line appears in the log:
ERROR| game.con:801: getflorzofslope: invalid sector -1
After an hour of playtime the log might be a couple of megs large due to this and weird stuff starts to happen. How do I fix this?
Thanks in advance.
#3382 Posted 25 December 2023 - 12:45 PM
state getfloordist getactor[THISACTOR].x x getactor[THISACTOR].y y updatesector x y TEMP7 ifvare TEMP7 -1 { killit break } getflorzofslope TEMP7 x y z getactor[THISACTOR].z TEMP8 subvarvar z TEMP8 shiftvarr z 8 subvar z 1 ends
I'm not sure if that fixes it because the issue could be happening further downstream in code that you didn't show. But the concept is simple enough -- do not allow the jibs to persist when out of bounds!
#3384 Posted 30 December 2023 - 07:48 AM
I also noticed that after spending a lot of trial and error time getting all the hud offsets the way I wanted, the position shifted when I added the nobob command. I can deal with it but just thought I'd mention it in case others plan to use the nobob. Apply it before you start adjusting position.
This post has been edited by Mark: 30 December 2023 - 08:06 AM
#3385 Posted 30 December 2023 - 05:22 PM
Mark, on 30 December 2023 - 07:48 AM, said:
I also noticed that after spending a lot of trial and error time getting all the hud offsets the way I wanted, the position shifted when I added the nobob command. I can deal with it but just thought I'd mention it in case others plan to use the nobob. Apply it before you start adjusting position.
You have to be using CON code to display the weapon. If you are just overwriting the hardcoded tiles with your models, then they will inherit the hardcoded display features such as using a bright shade when firing.
If you are already using code for the display, then you just need to find where the shade is being set and make the edit so it doesn't brighten when firing.
#3386 Posted 30 December 2023 - 06:32 PM
#3387 Posted 30 December 2023 - 06:57 PM
Mark, on 30 December 2023 - 06:32 PM, said:
I'm assuming you already applied the WEAPON_NOVISIBLE flag to each weapon which is why they don't flash the level. If that's the case then I don't know what you could do besides having your own display code for them.
https://wiki.eduke32...i/WEAPONx_FLAGS
If you really are just using the hardcoded display with your own models, then one easy solution would be to include the weapon.sample.con included with EDuke32, then comment out the lines that set hud_shade to negative values.
#3388 Posted 30 December 2023 - 07:23 PM
I never saw that command when browsing the wiki. I used an old probably outdated method that I used since way back in my Graveyard project. IIRC I spotted it in someone's post and added to my list of con code snippets.
// remove all flash from weapon fire
onevent EVENT_RESETWEAPONS
// pistol
setvarvar gs WEAPON1_FLAGS
setvarvar gs WEAPON2_FLAGS
orvar gs 256
setvarvar WEAPON1_FLAGS gs
setvarvar WEAPON2_FLAGS gs
endevent
This post has been edited by Mark: 30 December 2023 - 07:24 PM
#3389 Posted 30 December 2023 - 07:29 PM
Mark, on 30 December 2023 - 07:23 PM, said:
I never saw that command when browsing the wiki. I used an old probably outdated method that I used since way back in my Graveyard project. IIRC I spotted it in someone's post and added to my list of con code snippets.
// remove all flash from weapon fire
onevent EVENT_RESETWEAPONS
// pistol
setvarvar gs WEAPON1_FLAGS
setvarvar gs WEAPON2_FLAGS
orvar gs 256
setvarvar WEAPON1_FLAGS gs
setvarvar WEAPON2_FLAGS gs
endevent
^ That code adds the flag that I was talking about. Although the code you posted only adds it to the pistol and shotgun. It's somewhat defective however since it sets the pistol to have all the same flags as the shotgun, which it's not supposed to.
#3390 Posted 30 December 2023 - 07:41 PM
Unless you think I can just drop that code in and it will use my existing models. Then all I have to do is look into the shade changing. My uneducated guess is its not that simple
This post has been edited by Mark: 30 December 2023 - 07:46 PM