Duke4.net Forums: Trooper Dan - Viewing Profile - 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!

Reputation: 2944 My posts turn threads into gold
Super Moderator
Active Posts:
7,596 (1.8 per day)
Most Active In:
Everything EDuke32 (3523 posts)
28-January 07
Profile Views:
Last Active:
User is online Today, 04:23 PM
Not online

My Information

Member Title:
Duke Plus Developer
Age Unknown
Birthday Unknown
Male Male

Contact Information

Click here to e-mail me
MSN  deeper-thought@hotmail.com
Website URL:
Website URL  http://fissile.duke4.net/index.html

Latest Visitors

Topics I've Started

  1. Abusing EVENT_SCREEN

    01 August 2018 - 12:42 PM

    Very useful event. It's no trouble to use it in the intended way, allowing the player to cancel it by pressing a button. But let's suppose I want to force the player to wait, and let's suppose we are in the middle of a level. This can be achieved by setting RETURN to 0 for a while. Game time does not pass during the event, so I can use totalclock to measure the passage of time. When the forced wait is over, RETURN can be set to 1 (either by the player or it can just be forced). So far, so good. But there are two problems:

    -If the player presses a key during the forced wait, the screen flashes, even though the cutscreen stays on.
    -Forcing the player to wait by setting RETURN to 0 in the event will prevent even the Esc key from working.

    Does anyone have suggestions as to a better way to do this, or will there possibly be an update to allow for the event to be used the way I want?

    Below is the relevant part of my code. The vars cutend end midscreen have been set in an actor's code, which has also used the startscreen command.

    onevent EVENT_SCREEN
    	ifvare RETURN 0
    		ifvarg SCREENALPHA 0    // QUICK FADEOUT
    			screenpal 0 0 0 SCREENALPHA
    			subvar SCREENALPHA 5
    	else ifvare RETURN 1
    			setvar SCREENALPHA 255
    	ifn midscreen NO
    		ifge totalclock cutend set RETURN 1 else set RETURN 0
    		ife RETURN 1 set midscreen NO
    		rotatesprite 160 100 65536 0 midscreen 0 0 2 0 0 xdim ydim
  2. SOLVED Hardcoded enemy falling damage handled badly

    29 July 2018 - 02:15 PM

    If an actor is an "enemy", EDuke32 has a hardcoded behavior for killing them when they fall from a significant height.

    It sets the actor's hit points (extra) to 0.
    It sets the actor's damage type (htpicnum) to SHOTSPARK1 (bullet).
    It sets the actor's damage (htextra) to 1.

    This will make the enemy die, regardless of how many hit points it had. Note that the falling height which triggers this is not very high -- even falling from the secret RPG to the ground in E1L1 will trigger it.

    This is problematic because:

    • Falling damage is not appropriate for some enemies (including some enemies that actually do "fall" using the CON command)
    • It's an insta-kill, so even if fall damage were desirable, infinite damage is not typically desirable
    • AFAIK There's no flag or other nice means to eliminate the damage. You either have to not use the CON fall command, or you have to detect and circumvent the damage by monitoring certain structs before the actor calls ifhitweapon and then reset hit points to the amount from the previous tic

    I'm also not sure if the feature is working as intended. I looked at the source for the fall command and found some code that does something similar, but it looks like it has some extra conditions in there which were not being met by my falling enemies. One other thing I'd like to point out is that there are various hardcoded differences between enemy and notenemy. In general, enemies move around and clip better, so it's not desirable define an actor as notenemy.

    EDIT Additional notes: I do not know if the hardcoded fall damage is applied to the original Duke 3D enemies, or only to custom enemies. I also don't know if the feature is in DOS Duke, or if it was added to EDuke32 later. If it was added later, then it surely is affecting various mods in a bad way.

    25 July 2018 - 03:34 PM

    Is there any way to get the ID of the sprite that is playing the sound from within EVENT_SOUND (when applicable)?

    RETURN is the sound #, sprite ID would seem like a natural fit for THISACTOR in the event. My apologies if this has already been implemented, I'm not in a position to check right now.

    Without any context for the sound, the event is not nearly as useful as it could be.
  4. Looping sounds

    28 June 2018 - 02:41 AM

    Sometimes it's important to make ambient sounds loop, but there's a very audible gap when a sound restarts. This is nothing new, but, I could swear that they used to work better in EDuke32.

    Here's the sound I'm trying to get looping right now:


    It loops flawlessly when I play it back in other apps. In EDuke32, I have tried the following:

    soundonce SOUNDNAME // executed constantly


    ifactorsound THISACTOR SOUNDNAME nullop else sound SOUNDNAME

    I have also tried adding the looping bit to the sound definition. None of this makes any difference, there is always a very noticeable gap when the sound loops. This happens with other sounds, too. The only thing I can think to do for now is copy paste in the sound to make it much longer, so at least the gap is heard less frequently.

    Oh, and my question: What should I do?
  5. wiki broken and another issue

    04 June 2018 - 01:31 PM

    The quick links at the top of the EDuke32 wiki are not showing. I'm referring to links to the lists of commands, structure members, etc. Right now you have to search for the individual item you want, which means you have to remember what it is.

    An unrelated issue that I just discovered: The htflag for SFLAG_WAKEUPBADGUYS does not work as intended. It will cause bad guys to wake up, but then they immediately go back to sleep unless the player happens to be in line of sight with them when they wake. This makes the flag useless, since they would normally wake up when in line of sight to the player even without this flag being used.

    Example: Set the flag on SHOTSPARK1. Now shoot a bullet around a corner so that a monster can see the impact but not the player. The monster will wake up, but then will immediately go back to sleep. I guess this is because the flag is causing the statnum of the monster to change, but it is not changing its timetosleep to an appropriate value. One could write separate script to keep the monster awake, but that would mean knowing which monsters to set it on, which completely negates any value that the spriteflag has, because you would have to write a loop that checks the monsters in line of sight to the SHOTSPARK1, at which point you might as well just forget the flag and change the statnum too.



Page 1 of 1
  1. Photo 27 May 2012 - 06:52
    Can you please release just the AI part of DukePlus so we can run it with the latest eDuke? Thanks!
  2. Photo 19 Aug 2011 - 20:12
    tanks for the support dan! here is "daniel"! (from the msn) =)
  3. Photo 11 Jul 2011 - 11:45
    I can give beta-testing a shot. I have no distractions, just the limitation on how long my back can hold out.
Page 1 of 1

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