EDuke32 Scripting "CON coding help"
#3181 Posted 01 January 2023 - 08:50 PM
After doing this the load time dropped quite a bit and that was about when I was trying out the htflag.
#3182 Posted 02 January 2023 - 10:35 AM
#3183 Posted 02 January 2023 - 12:32 PM
VGames, on 02 January 2023 - 10:35 AM, said:
This is probably due to these walls being parts of moving sectors (like doors), the bulletholes won't appear on them, as they wouldn't be carried along (and would look stupid just hanging there in the air if the door moves ), remember bulletholes are essentially wall-aligned sprites.
#3184 Posted 02 January 2023 - 01:51 PM
You should be able to spawn a wall aligned decal on the event where the bullet impacts by getting the angle to the wall etc to get around the default setting preventing it though you'll want to delete them whenever that wall shifts, with the exception of the decal sitting in a rotating sector. If the original decal won't spawn make a dupe of it.
-
Is there a way to pass down a projectile's palette to the sprite it spawns on impact (proj_spawns)? This projectile is using noshade and taking on the palette from the actor shooting it
#3185 Posted 02 January 2023 - 02:51 PM
#3186 Posted 02 January 2023 - 04:21 PM
How do I code this model to use different skins for different palettes?
model "models/nailgun/nailgun.MD2" { scale 20 skin { pal 0 file "models/nailgun/nailgun.png" } anim { frame0 "shot1" frame1 "shot1" fps 4 } frame { frame "shot1" tile0 6872 tile1 6872 } anim { frame0 "shot2" frame1 "shot9" fps 40 } frame { frame "shot2" tile0 6873 tile1 6874 } hud { tile0 6872 tile1 6874 xadd -0.38 yadd 0.3 zadd 0 angadd 0 } }
This post has been edited by VGames: 02 January 2023 - 05:01 PM
#3187 Posted 02 January 2023 - 07:17 PM
#3188 Posted 02 January 2023 - 09:46 PM
action EXPLOSION_FRAMES 0 20 1 1 4 action ASMOKEBLAST1 3743 16 1 1 8 // 3743 tiles from original EXPLOSION2 (1890) = 5633 action ASMOKEBLAST2 3763 33 1 1 4 actor EXPLOSION2 1 EXPLOSION_FRAMES { ife extrasaved 1 ifaction EXPLOSION_FRAMES { action ASMOKEBLAST1 cstat 0 } else ife extrasaved 2 ifaction EXPLOSION_FRAMES { action ASMOKEBLAST2 cstat 0 } else { ifactioncount 20 killit } } enda
I have also tried placing a CACTOR command, but this just froze the actions on their first frame when spawned;
{ ife extrasaved 1 ifaction EXPLOSION_FRAMES { cactor SMOKEBLAST1 action ASMOKEBLAST1 cstat 0 }
And I tried placing the following in EVENT_EGS;
case EXPLOSION2 // Alternate explosions { ifn sprite[].owner -1 // owner being the SEENINE sprite that spawned the EXPLOSION2 actor getav[sprite[].owner].extrasaved extrasaved ife extrasaved 1 { ifactioncount 16 killit } else ife extrasaved 2 { ifactioncount 33 killit } else nullop } break
But that doesn't seem to do anything either...
#3189 Posted 02 January 2023 - 09:58 PM
action EXPLOSION_FRAMES 0 20 1 1 4 action ASMOKEBLAST1 3743 16 1 1 8 // 3743 tiles from original EXPLOSION2 (1890) = 5633 action ASMOKEBLAST2 3763 33 1 1 4 actor EXPLOSION2 1 EXPLOSION_FRAMES ife extrasaved 1 ifaction EXPLOSION_FRAMES { action ASMOKEBLAST1 cstat 0 } else ife extrasaved 2 ifaction EXPLOSION_FRAMES { action ASMOKEBLAST2 cstat 0 } ifaction EXPLOSION_FRAMES ifactioncount 20 killit else ifaction ASMOKEBLAST1 ifactioncount 16 killit else ifaction ASMOKEBLAST2 ifactioncount 33 killit enda
Just change the actor, don't try to mess with the animations in EGS
#3190 Posted 03 January 2023 - 06:28 AM
#3191 Posted 03 January 2023 - 01:12 PM
VGames, on 02 January 2023 - 04:21 PM, said:
The one thing that should be ok in every case is adding decals to sector 0 masked walls only if you can find a way to exempt textures with alpha. I can't think of any cases where a solid masked surface would create trouble having a bullet hole on it.
#3192 Posted 03 January 2023 - 07:11 PM
Ok so this:
model "models/nailgun/nailgun.MD2" { scale 20 skin { pal 0 file "models/nailgun/nailgun.png" } skin { pal 1 file "models/nailgun/nailgunB.png" } skin { pal 2 file "models/nailgun/nailgunR.png" } skin { pal 8 file "models/nailgun/nailgunG.png" } anim { frame0 "shot1" frame1 "shot1" fps 4 } frame { frame "shot1" tile0 6872 tile1 6872 } anim { frame0 "shot2" frame1 "shot9" fps 40 } frame { frame "shot2" tile0 6873 tile1 6874 } hud { tile0 6872 tile1 6874 xadd -0.38 yadd 0.3 zadd 0 angadd 0 } }
does nothing for the view model of the gun. I tried the multiple skin lines like you said for the pickup model for the weapon and it worked just like you said it would:
model "models/nailgun_pick/nailgun_pick.md2" { scale 2.6 shade 0 skin { pal 0 file "models/nailgun_pick/nailgun_pick.png" } skin { pal 1 file "models/nailgun_pick/nailgun_pickB.png" } skin { pal 2 file "models/nailgun_pick/nailgun_pickR.png" } skin { pal 8 file "models/nailgun_pick/nailgun_pickG.png" } anim { frame0 "shot1" frame1 "shot1" fps 4 } frame { frame "shot1" tile0 6871 tile1 6871 } }
But for the view model it does nothing. Only the pal 0 skin is used.
#3193 Posted 03 January 2023 - 08:13 PM
I don't know if you can make them use different pals, though, I don't recall ever trying that.
#3194 Posted 04 January 2023 - 12:25 PM
Danukem, on 03 January 2023 - 08:13 PM, said:
I don't know if you can make them use different pals, though, I don't recall ever trying that.
Ok cool. I’ll check this stuff out again. Maybe I missed something
#3195 Posted 05 January 2023 - 12:56 PM
useractor notenemy DOORBOARDED 120 { cstat 273 // blocked, hittable ifaction 0 { ifhitweapon { ifstrength 100 action ONE break } else { ifstrength 80 action TWO break } else { ifstrength 60 action THREE break } else { ifstrength 40 action FOUR break } else { ifstrength 20 action FIVE break } else { ifstrength 0 killit } } } enda
#3196 Posted 05 January 2023 - 01:13 PM
MC84, on 05 January 2023 - 12:56 PM, said:
It's easy enough, but first we need to get clear on the intent. What is supposed to happen if you do enough damage to reduce it multiple levels in one hit? Do you want it reduced by only one damage level anyway?
#3197 Posted 05 January 2023 - 02:05 PM
Danukem, on 05 January 2023 - 01:13 PM, said:
Well I guess in my simplistic understanding I assumed that the 'ifhitweapon' branch included the multiple else statements to handle the possibility that you shoot the actor with an RPG and it takes it down multiple levels... Those actions are relative to the zero/default tile of the actor right? So if the actor was hit by a weapon, and it takes the damage down to 20 (from 120), then action 5 will skip ahead to the 5th damaged state of the actor right? I mean obviously it's not working - but that was the intent!
This post has been edited by MC84: 05 January 2023 - 02:06 PM
#3198 Posted 05 January 2023 - 05:29 PM
MC84, on 05 January 2023 - 02:05 PM, said:
Something like this should work:
useractor notenemy DOORBOARDED 120 { cstat 273 // blocked, hittable ifaction 0 { ifhitweapon { ifstrength 100 { action ONE break } else ifstrength 80 { action TWO break } else ifstrength 60 { action THREE break } else ifstrength 40 { action FOUR break } else ifstrength 20 { action FIVE break } else killit } } } enda
Notice where the brackets are.
This post has been edited by VGames: 05 January 2023 - 05:30 PM
#3199 Posted 05 January 2023 - 05:32 PM
This post has been edited by VGames: 05 January 2023 - 05:38 PM
#3200 Posted 05 January 2023 - 05:51 PM
VGames, on 05 January 2023 - 05:29 PM, said:
Something like this should work:
Notice where the brackets are.
Thanks for trying to help - however now when I shoot the actor it goes straight to killit... Although you have taught me something - I now realize that the brackets should have followed the else if statements.
#3201 Posted 05 January 2023 - 07:12 PM
MC84, on 05 January 2023 - 12:56 PM, said:
The way "ifstrength" works is it returns true if the health value is less than or equal to X. The reason it gets stuck after the first one is because every value is less than or equal to 100, so it never enters the other branches. You should be able to easily fix this by ordering your ifstrength statements from lowest to highest, rather than highest to lowest. Also, yes the bracket should go after the next if statement, not after else
ifstrength 20 { // something } else ifstrength 40 { // something else } etc.
#3202 Posted 05 January 2023 - 07:21 PM
MC84, on 05 January 2023 - 12:56 PM, said:
useractor notenemy DOORBOARDED 120 { cstat 273 // blocked, hittable ifaction 0 { ifhitweapon { ifstrength 100 action ONE break } else { ifstrength 80 action TWO break } else { ifstrength 60 action THREE break } else { ifstrength 40 action FOUR break } else { ifstrength 20 action FIVE break } else { ifstrength 0 killit } } } enda
It's getting stuck because all of that only fires on IFACTION 0. Changing the action to anything else stops meeting that condition.
After that it is getting stuck on the first strength check because 'ifstrength 100' is true until death (if strength <= 100).
#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.