Duke4.net Forums: Those simple questions thread - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

  • 16 Pages +
  • « First
  • 13
  • 14
  • 15
  • 16
  • You cannot start a new topic
  • You cannot reply to this topic

Those simple questions thread  "Simple questions, simple answers"

User is online   Mark 

  • Honored Donor
  • 2,838

#421

deleted

This post has been edited by Mark.: 30 May 2018 - 08:54 AM

0

User is offline   Photonic 

  • 1,262

#422

Is it possible to stop poly2vox from running, maybe a command line arg, or a def token for voxels? If I click start while accidentally on opengl with all these voxels my computer shits the bed.
0

User is offline   Chip 

  • 23

#423

*Edit*

Never mind - I sorted it!

This post has been edited by Chip: 01 June 2018 - 08:10 AM

0

User is offline   RichardStorm 

  • 211

#424

Anybody can tell me how viewingrange variable works or create its wiki page ? http://wiki.eduke32....pdated_gamevars
0

User is offline   Photonic 

  • 1,262

#425

View PostRichardStorm, on 06 June 2018 - 07:53 AM, said:

Anybody can tell me how viewingrange variable works or create its wiki page ? http://wiki.eduke32....pdated_gamevars

I don't know but this came up when I searched some source files.

    // xdimenscale is scale(xdimen,yxaspect,320);
    // normalization by viewingrange so that center-of-aim doesn't depend on it
    globalhoriz = mulscale16(dahoriz-100,divscale16(xdimenscale,viewingrange))+(ydimen>>1);


        globvis = mulscale16(globalhisibility,viewingrange);
        if (sec->visibility != 0) globvis = mulscale4(globvis, (uint8_t)(sec->visibility+16));


Just did a CON test and got an error message.

Quote

error: variable `viewingrange' is read-only.


This post has been edited by Drek: 06 June 2018 - 09:50 AM

0

User is offline   Hendricks266 

  • Weaponized Autism
  • 6,348

  #426

You'll have to use setaspect.
0

User is offline   thisbecasper 

  • 1

#427

Removed

This post has been edited by thisbecasper: 28 June 2018 - 11:45 PM

0

User is offline   MatthewPatel 

  • 3

#428

Is it possible to play some older Duke TC's that have more than 1 GRP file?
0

User is offline   Photonic 

  • 1,262

#429

Sure is. They are probably already repackaged in the addon compilation.
http://hrp.duke4.net/download.php
About halfway down the page.

If whichever tc you're after is not in there, put in a request and maybe it can be cleaned up for you.
1

User is offline   Echelon5 

  • 5

#430

How would I go about adding unique item pickup sounds? You know, giving health their own sound, ammo, etc. I'm assuming it's somewhat similar to ZDoom, where you define a new set of sounds, then tell the pickup event to play the sound. I'm just not sure where to begin.
0

User is offline   Photonic 

  • 1,262

#431

View PostEchelon5, on 06 August 2018 - 12:44 PM, said:

How would I go about adding unique item pickup sounds? You know, giving health their own sound, ammo, etc. I'm assuming it's somewhat similar to ZDoom, where you define a new set of sounds, then tell the pickup event to play the sound. I'm just not sure where to begin.


It's a 2 part process, 1st you'll need to define your new sound in USER.CON/DEFS.CON, then in GAME.CON find the actor (item) you want to modify and set it to play the new sound.

You'll be looking for stuff like this, also the wiki will be helpful http://wiki.eduke32.com/wiki/Scripting

//DEFS.CON
define SHOTGUN_FIRE                   109

//USER.CON
definesound SHOTGUN_FIRE        shotgun7.voc      0    512    254 0   0

//GAME.CON
state getcode
  ifactor ATOMICHEALTH
    globalsound GETATOMICHEALTH
  else
    globalsound DUKE_GET
  palfrom 16 0 32
  ifrespawn
  {
    move RESPAWN_ACTOR_FLAG
    spawn RESPAWNMARKERRED
    cstat 32768
  }
  else
    killit
ends

actor AMMO
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp pshrunk nullop
    else
      ifp palive
        ifcount 6
          ifpdistl RETRIEVEDISTANCE
            ifcanseetarget
      {
        addammo PISTOL_WEAPON PISTOLAMMOAMOUNT
        quote 65
        ifspawnedby AMMO
          state getcode
        else
          state quikget
      }
enda

0

User is offline   Sanek 

  • 633

#432

I made a small dm map where player's respawn points is just above the Death Row floor, so they'll start the match without a pistol. Will this trick work in multiplayer, and most important - will it work in World Tour?
0

User is offline   The Battlelord 

  • 28

#433

Apologies in advance if this is not the right topic, does not matter which mod (exception the N64 one) but why Duke Nukem can't jump as usual when an elevator is moving? (inside of it obviously).

Who the hell are you!?
Don't dare to blame my english, I'm an Alien after all... Heavily armed too...
0

#434

What is the "blend" property for? The wiki page is empty. I tried to change the values, but I did not go through any changes. Is this applicable to polymer mode?
0

User is offline   Hendricks266 

  • Weaponized Autism
  • 6,348

  #435

It is for switching out 33% translucency table for one of 255 other color blending table slots you can fill.
0

User is offline   Perro Seco 

  • 236

#436

I think this was asked some years ago somewhere in the forums, but I can't find it. Is there any way to make an elevator platform (lo-tag 16 or 17) return to its initial position after being used? Something like a door with a SE 10. Maybe some Build trick or some CON code?

Posted Image
0

User is offline   Forge 

  • 8,246

#437

View PostPerro Seco, on 21 December 2018 - 03:05 PM, said:

I think this was asked some years ago somewhere in the forums, but I can't find it. Is there any way to make an elevator platform (lo-tag 16 or 17) return to its initial position after being used? Something like a door with a SE 10. Maybe some Build trick or some CON code?

make it switch activated
put a one-time touchplate in a sector the player steps in when they leave the platform

course that will only work once.

This post has been edited by Forge: 21 December 2018 - 03:47 PM

0

User is offline   Photonic 

  • 1,262

#438

View PostPerro Seco, on 21 December 2018 - 03:05 PM, said:

I think this was asked some years ago somewhere in the forums, but I can't find it. Is there any way to make an elevator platform (lo-tag 16 or 17) return to its initial position after being used? Something like a door with a SE 10. Maybe some Build trick or some CON code?


Trigger a door off the map same tag as your elevator, with auto close set for the door it will re-trigger the initial elevator again after it's cycle, change height of the sector beside the door for timing.

Attached Image: capt0000.png
0

User is offline   Perro Seco 

  • 236

#439

A bit late, but thank you both for your help. Unfortunately, I couldn't use your solutions. What Forge said was useful, but the elevator worked only once, and Photonic's solution was almost perfect, but then I couldn't call the elevator from the lower floor, and I didn't want to place a button for it.

I decided then to create an invisible actor, and placed two copies of it, one inside the elevator and the other one on the lower floor, like this:
Posted Image

With this code, the elevator returns (from the lower floor) to it's initial position (the upper floor):
onevent EVENT_SPAWN
  ifactor XXX cstat 32768
endevent

actor XXX
  ifspritepal 1
  {
    findnearactorz XXX 32 16 TEMP
    ifvarn TEMP -1 ifcount 128
    { getactor[THISACTOR].sectnum TEMP operatesectors TEMP THISACTOR resetcount }
  }
enda


Posted Image
0

User is offline   Trooper Dan 

  • Duke Plus Developer
  • 3,676

#440

If an actor of tile XXX uses findnearactorz XXX, then it should always return true because it will find itself. At least that's how I remember that command working.

So I wonder if that code is working only because of the ifcount ... resetcount timer which prevents the operatesectors command from triggering constantly.

EDIT: If that is going on, then it's an easy fix -- just use cactor to some other tile number right before the findnearactorz, and cactor XXX right after.


This post has been edited by Trooper Dan: 04 January 2019 - 03:14 AM

0

User is offline   Perro Seco 

  • 236

#441

Both sprites showed in the pic use the same tile (I was referring to it like XXX in the code), which makes me think that findnearactor and its variants ignore their own actor and only return an ID if other sprite is inside the radius.

I used ifcount and resetcount to send the elevator back to the upper floor after a short period of time (so I can prevent noobs from dying by falling through the hole :D), like the elevators in Doom or in Tekwar. It only starts counting when both sprites are near each other.

Posted Image
0

User is offline   Trooper Dan 

  • Duke Plus Developer
  • 3,676

#442

View PostPerro Seco, on 04 January 2019 - 04:45 AM, said:

Both sprites showed in the pic use the same tile (I was referring to it like XXX in the code), which makes me think that findnearactor and its variants ignore their own actor and only return an ID if other sprite is inside the radius.


Looking at the current source, you are right. The condition "spriteNum != vm.spriteNum" got added at some point. I definitely remember that when I started CON coding back in 2006, it wasn't that way, though.
0

User is online   Master O 

  • 84

#443

Rather than create a new thread, I'll ask here:


On the 1st map of the Duke Nukem 3D custom level "Battlefield 3" (Battlefield3.grp), called "The Holy Yards", does anyone know where the fourth switch is? The door in the arena doesn't open no matter how many switches I press.

This post has been edited by Master O: 11 January 2019 - 10:36 AM

0

User is offline   Perro Seco 

  • 236

#444

I have a stupid question: how can I activate a sliding door with a switch?

I am referring to a sector with lotag 25 and a SE 15. I placed an activator on it but didn't work. I'm not talking about unlocking it, but activating it at the moment the switch is used.

Posted Image
0

User is online   Mark 

  • Honored Donor
  • 2,838

#445

They work for me. I just made a test to be sure. I've posted a few times before that sometimes switches can be fussy about how high up they are on the wall. Try a few positions from waist to shoulder high and see if it works.

This post has been edited by Mark: 29 January 2019 - 02:47 PM

0

User is offline   Perro Seco 

  • 236

#446

Thank you, but that's not the problem, because the switch can be activated without any problem.

View PostMark, on 29 January 2019 - 02:44 PM, said:

I just made a test to be sure.
Would be possible to have that sample map? Just to make sure I'm not doing anything wrong.

Posted Image
0

User is online   Mark 

  • Honored Donor
  • 2,838

#447

I knew I had sliding doors in a map for Decay so I temporarily added a wall switch and activator for testing. Nothing special, same lotag for both, no hitag. But now that I think of it, I don't make sliding doors the way that is shown in the tutorials I've seen. My way is similar but simpler. But it shouldn't make a difference. I still use the same effectors. Make sure there is no autoclose. That messes with slide doors.

edit: Thats odd. I built a separate test map and the doors don't open. :blink:

This post has been edited by Mark: 29 January 2019 - 05:25 PM

0

User is offline   Forge 

  • 8,246

#448

I make them lazy (a bit cleaner than this when I actually intend to use them in a real map)
Works and you can't see the stretching wall textures when the door sector is raised all the way to the ceiling

Attached File  slidingdoor.zip (496bytes)
Number of downloads: 17

This post has been edited by Forge: 29 January 2019 - 07:29 PM

0

User is online   Mark 

  • Honored Donor
  • 2,838

#449

I make my doors with red sectors and not attached to the walls. No stretching. I disable grid locking so I can move the doors very close together so its harder to see a seam.

Attached thumbnail(s)

  • Attached Image: capt0004.png


This post has been edited by Mark: 29 January 2019 - 07:41 PM

0

User is offline   Forge 

  • 8,246

#450

View PostMark, on 29 January 2019 - 07:39 PM, said:

I make my doors with red sectors and not attached to the walls. No stretching. I disable grid locking so I can move the doors very close together so its harder to see a seam.

I do it pretty similar to that when I want to make the door with a transparent wall - like glass.
It also carries child sectors.

A solid door doesn't need the pre-made pocket, so I save a few walls.

This post has been edited by Forge: 29 January 2019 - 07:51 PM

0

Share this topic:


  • 16 Pages +
  • « First
  • 13
  • 14
  • 15
  • 16
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options