
EDuke32 Scripting "CON coding help"
#3204 Posted 06 January 2023 - 07:45 AM
VGames, on 05 January 2023 - 05:32 PM, said:
Still looking for some help with this if it’s even possible.
But also wanted to ask if “digitalnumber” is deprecated now what is its replacement?
This post has been edited by VGames: 06 January 2023 - 07:55 AM
#3205 Posted 06 January 2023 - 10:41 AM
https://wiki.eduke32...iki/Screen_size
Screentext should be used for all HUD text drawing. At the bottom of the wiki page are examples on how to convert deprecated screen text commands to screentext.
https://wiki.eduke32...wiki/Screentext
#3206 Posted 06 January 2023 - 06:28 PM
Reaper_Man, on 06 January 2023 - 10:41 AM, said:
https://wiki.eduke32...iki/Screen_size
Screentext should be used for all HUD text drawing. At the bottom of the wiki page are examples on how to convert deprecated screen text commands to screentext.
https://wiki.eduke32...wiki/Screentext
This is what I’ve been looking for thanks
#3207 Posted 07 January 2023 - 08:31 AM
i use this in event_sound
case PSA1 { quote 125 rotatesprite 0 0 65536 0 6282 0 0 0 0 0 xdim ydim } break
so the quote works fine, but tile 6282 isnt rendered, or too briefly to be seen.
#3208 Posted 07 January 2023 - 10:00 AM
#3209 Posted 08 January 2023 - 12:42 AM


#3210 Posted 09 January 2023 - 05:03 PM
#3211 Posted 10 January 2023 - 11:44 PM
Since cstat
8192 is dynamic shadow
16384 is invis with dynamic shadow
32768 is invis
Maybe 65536 , 131072, or 262144
Emitting dynamic light is 256 in spriteflags and I don't think there's much chance a receiving dynamic flag is hidden at the bottom (536870912, 1073741824, 2147483648)
There should not be any arbitrary non-powers of 2 like in the WORKSLIKE flags because those are brought on by one value or the other being impossible to use together.
#3212 Posted 11 January 2023 - 12:47 AM
#3213 Posted 11 January 2023 - 06:21 AM
This post has been edited by VGames: 11 January 2023 - 06:23 AM
#3214 Posted 11 January 2023 - 11:25 AM
VGames, on 11 January 2023 - 06:21 AM, said:
nonono, I was saying they don't exist. You literally can't enter a higher value than that, mapster won't even let you.
#3215 Posted 11 January 2023 - 12:43 PM
#3216 Posted 11 January 2023 - 09:16 PM
This one is popping up as if it has not yet been cstat'd while none of the others have this problem.
#3217 Posted 11 January 2023 - 09:20 PM
#3219 Posted 12 January 2023 - 02:13 AM
speaking of the heavyhbomb, would it theotretically work if i check if its moving to play a random "rolling on the floor" sound like in Powerslave/Exumed? with a iffloordist check ofcourse.
This post has been edited by jimbob: 12 January 2023 - 02:15 AM
#3220 Posted 12 January 2023 - 02:30 AM
jimbob, on 12 January 2023 - 02:13 AM, said:
If it was me I would just replace it with my own actor as you suggested. It's a cleaner solution than trying to fight the hardcoding.
jimbob, on 12 January 2023 - 02:13 AM, said:
Yes, but also stop the sound when it stops moving or when it blows up.
#3221 Posted 12 January 2023 - 03:33 AM
Danukem, on 12 January 2023 - 02:30 AM, said:
Quote
nice, i'll look into it.
#3222 Posted 15 January 2023 - 09:05 PM
#3224 Posted 20 January 2023 - 01:22 AM
i think i did a rough google translate version of it but i dont know if i still have it.
This post has been edited by jimbob: 20 January 2023 - 01:23 AM
#3225 Posted 20 January 2023 - 02:34 AM
1) Put all of the graphics you need for displaying the weapon in the game (.art tiles, DEFed in models, or whatever medium you are using)
2) Add all the sounds, too, with definesound and whatever sound files you are using
3) Decide what weapon slot your weapon is going on, and set the predefined values for that weapon slot to the values you want. https://wiki.eduke32...efined_gamevars
3.1 For example, if it is going on the pistol slot and you want it to shoot ROCKETS, then in your code declare "gamevar WEAPON1_SHOOTS RPG 1"
3.2 Study the list of weapon variables and experiment with changing the values on them. Spend some time on this. Just try changing the SHOTSPERBURST on a weapon, its TOTALTIME, what it SHOOTS, the sound it makes when it shoots, etc etc etc. Spend hours on this if necessary and do not move on until you are competent at changing the more important vars and understanding what they do.
4) If needed, define a custom projectile for your weapon to shoot. Skip this step if it is going to shoot one of the projectiles already in the base game. https://wiki.eduke32...efineprojectile
4.1 Look at the linked entry on defineprojectile. It's accurate and even has an example. If you set WEAPONX_SHOOTS to your custom projectile tile number, your weapon will shoot that projectile.
4.2 There are literally hundreds and probably thousands of custom projectiles defined in various released mods. Maybe take a look at them if you aren't sure on what values to use. You are looking for entries that say "defineprojectile" in the code.
4.3 If your custom projectile spawns something and/or has a trail, select the relevant actors for that or make them if needed.
5) If you are using your own weapon art, then use https://wiki.eduke32...VENT_DRAWWEAPON to cancel out the hardcoded display of the weapon on your slot and then display your weapon.
5.1. E.g. if you are using the pistol slot then use "ife currentweapon PISTOL_WEAPON set RETURN -1" to cancel out the hardcoded display of the pistol.
5.2 Use the rotatesprite command to draw your weapon. This may require multiple draws depending on what is going on (.e.g if the weapon is reloading you may be drawing the weapon plus a separate hand sprite and also a clip sprite)
5.3 Weapon positioning is somewhat trial and error ,but there are many examples to look at in various mods. In general, though, you start with base x and y values for the screen coordinates that put the weapon in the right place, and you adjust those based on certain hardcoded values relating to weapon sway and bob. You want to subtract looking_angSR1 from x, add weapon_xoffset to x, add looking_arc to y, and subtract gun_pos from y (all of those constantly updated vars have wiki entries and most of the examples I alluded to use those vars to adjust positioning).
5.4 You can disregard the hardcoded weapon sway and bob stuff and make your own, though.
5.5 weaponcount in the display event is equivalent to player[].kickback_pic and obviously you want your display to change depending on the weaponcount in most cases. Since you studied the weapon properties page and experimented, you know that the max weaponcount is the WEAPONX_TOTALTIME.
#3226 Posted 21 January 2023 - 03:52 PM
#3227 Posted 21 January 2023 - 04:06 PM
#3229 Posted 21 January 2023 - 11:43 PM
lllllllllllllll, on 21 January 2023 - 11:22 PM, said:
I forgot about that one.
#3230 Posted 24 January 2023 - 12:27 PM
#3231 Posted 25 January 2023 - 02:22 AM
If by correct you're talking about sleeping actors getting squished it won't matter what method is used when it's placed inside the actor's code (it won't work during sleep).
This post has been edited by lllllllllllllll: 25 January 2023 - 02:24 AM