EDuke32 Scripting "CON coding help"
#3378 Posted 21 September 2023 - 12:03 PM
#3379 Posted 21 September 2023 - 03:12 PM
onevent EVENT_EGS
ifactor myprojectile
cstator 32768
endevent
onevent EVENT_EGS
ifactor myprojectile
setactor[THISACTOR].cstat 32768
endevent
onevent EVENT_EGS
ifactor myprojectile
setthisprojectile[THISACTOR].cstat 32768
endevent
tried these to make sure they don't work; the projectile is still visible
I'll combine it with event_game and movesprite in a bit to see if it magically erases the first frame.
The default cstat is 0 and the workslike is 32770.
#3380 Posted 21 September 2023 - 05:38 PM
GAME to unset invisible projectile
eshoot for movesprite on the projectile
The projectile itself is set to PROJ_VEL_MULT 24
onevent EVENT_GAME
ifactor myprojectile
{
ife var4 1
{
setthisprojectile[THISACTOR].cstat 32768
setav[THISACTOR].var4 0
}
}
endevent
onevent EVENT_EGS
ifactor myprojectile
{
setthisprojectile[THISACTOR].cstat 32768
setav[THISACTOR].var4 1
}
endevent
//actor code
{
eshoot myprojectile
cos var1 sprite[RETURN].ang
sin var2 sprite[RETURN].ang
shiftr var1 3
shiftr var2 3
movesprite RETURN var1 var2 0 CLIPMASK0 var3
}
//
#3381 Posted 22 September 2023 - 07:43 AM
onevent EVENT_GAME
ifactor myprojectile
{
ifl var4 2
{
add var4 1
ife var4 2
setthisprojectile[THISACTOR].cstat 32768
}
}
#3383 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
#3384 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
#3386 Posted 25 September 2023 - 10:56 AM
#3387 Posted 26 September 2023 - 07:15 AM
#3388 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
#3390 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
#3391 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
#3392 Posted 05 October 2023 - 01:42 PM
#3393 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
#3394 Posted 06 October 2023 - 01:19 PM
#3395 Posted 24 November 2023 - 08:42 PM
#3396 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?
#3397 Posted 25 November 2023 - 05:53 AM
#3398 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.
#3399 Posted 27 November 2023 - 02:00 PM
#3400 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.
#3402 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.
#3403 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!
#3405 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
#3406 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.

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


