Duke4.net Forums: EDuke32 Scripting - Duke4.net Forums

Jump to content

  • 94 Pages +
  • « First
  • 92
  • 93
  • 94
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is online   Danukem 

  • Duke Plus Developer

#2791

View Postjimbob, on 28 October 2021 - 10:10 AM, said:

the ifvar templ 10 is redundant anyway with the ifge sprite[PANZER].extra 0 line


Not really because even if extra is > 0 that doesn't mean extra/50 is > 0
0

User is offline   jimbob 

#2792

i guess, i'll test some more and if i dont get anymore hangups i'll just leave it remmed.
0

User is online   Danukem 

  • Duke Plus Developer

#2793

View Postjimbob, on 28 October 2021 - 11:31 AM, said:

i guess, i'll test some more and if i dont get anymore hangups i'll just leave it remmed.


It won't cause a hang because the drawing loop won't even start if temp is 0 after the division. I was just pointing out that there are cases where the break will be executed.
0

User is offline   RPD Guy 

#2794

Hello,

I don't know if someone asked this before, but, is there a way to tint a sector without affecting its containing sprites' pal?

I know that "spritenopal" kinda "solves" this, but I don't want to set every game sprite with this definition.
0

User is online   Danukem 

  • Duke Plus Developer

#2795

Maybe? On the wiki it says you press N on a sprite to toggle its auto-shading, so there maybe something undocumented for pal. In game, those settings are stored in the htflags bitfield, but that member doesn't seem to be stored in the map. The "flags" member in mapster is for cstat, which is different. However, the "no shade" bit is duplicated in cstat, which I'm guessing they did so that it could be stored in the map file.
0

User is online   Danukem 

  • Duke Plus Developer

#2796

Since this is the scripting thread, you may want a scripting solution. It's a bit cumbersome, but you could define a new sprite and then put it into the sector where you want the sprites to ignore pal:

define NOPALSPRITE ####
gamevar tempsprite 0 0
gamevar tempvar 0 0

eventloadactor NOPALSPRITE

cstat 32769
headspritesect tempsprite sprite[].sectnum
whilevarn tempsprite -1
{
  geta[tempsprite].htflags tempvar
  orvar tempvar 64
  seta[tempsprite].htflags tempvar
  nextspritesect tempsprite tempsprite
}

enda


I think that will work but I'm not entirely sure because the htflags might get overwritten after map load. If that's the case then the code would need to run later.
0

Share this topic:


  • 94 Pages +
  • « First
  • 92
  • 93
  • 94
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options