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

Jump to content

  • 124 Pages +
  • « First
  • 111
  • 112
  • 113
  • 114
  • 115
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is online   ck3D 

#3348

View PostMark, on 01 July 2023 - 02:13 PM, said:

There is a metric ton of code, some I'm not using seeing as how I am doing this mod in the AWOL project and there is always the chance there is some conflict there. I commented out custom code for player jumping height in case that was conflicting but it made no difference, I wasn't expecting it to but... AFAIK there is no custom code concerning water behavior because I don't think any mapper made use of underwater. I'm using TROR water and I don't know if you tested your code with vanilla water mapping or if it makes a difference at all.

Its been an uphill battle trying to streamline out the code I don't need and have to deal with the modified executable. Months ago I should have just cut all ties with that project and attempt to move my stuff to a clean eduke32 but I would have lost some of the AWOL features I liked. So I've foolishly limped along all this time.

Thanks for your help. I will still use what you gave me because it works somewhat. There are only 2 underwater areas on the map and while it would have upped the cool factor with the desired player Z consistantly, it will be good enough getting it half the time.


I too would have loved underwater moments in AWOL, but IIRC we were told not to design any since none of the character sprites had any animation tiles for swimming underwater.

This post has been edited by ck3D: 01 July 2023 - 02:55 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#3349

View Postck3D, on 01 July 2023 - 02:53 PM, said:

I too would have loved underwater moments in AWOL, but IIRC we were told not to design any since none of the character sprites had any animation tiles for swimming underwater.


If there is no underwater gameplay in AWOL at all, then there is probably a slew of other issues. Most likely the physics and everything is just vanilla Duke which wouldn't have been to the standards of the mod. I'm guessing it's a case of the coder knowing it would be a lot of work to bring underwater up to standards and so it was decided resources are better spent elsewhere.
0

#3350

Can you force certain tiles to be loaded at map load to avoid 'Load tile' lag from actors using hightiles?
0

User is offline   VGames 

  • Extra Crispy

#3351

Is there a command to have a weapon lower itself down past the bottom of the screen without having to use a custom animation? Holster doesn’t seem to work properly unless u press the holster button manually.
0

User is offline   Danukem 

  • Duke Plus Developer

#3352

https://wiki.eduke32...wiki/Weapon_pos
1

User is offline   VGames 

  • Extra Crispy

#3353

 Danukem, on 17 July 2023 - 11:29 AM, said:



Thanks a lot. That was a big help.
0

User is offline   zazo 

#3354

Hello,

I ask miself how to create a condition that cancels the effect of the "strafe left", "strafe right", "crouch" and "jump" movements of the player ... for the code of the use of a custom vehicle by the player, but not find a solution...
Within the EVENT_STRAFELEFT, EVENT_STRAFERIGHT i guess ??
Thank in advance
0

User is offline   Danukem 

  • Duke Plus Developer

#3355

 zazo, on 12 August 2023 - 02:40 AM, said:

Hello,

I ask miself how to create a condition that cancels the effect of the "strafe left", "strafe right", "crouch" and "jump" movements of the player ... for the code of the use of a custom vehicle by the player, but not find a solution...
Within the EVENT_STRAFELEFT, EVENT_STRAFERIGHT i guess ??
Thank in advance


For strafing you can cancel the corresponding movement bits:


https://wiki.eduke32...i/Movement_lock

For jumping and crouching, set RETURN to -1 in the corresponding events.
0

User is offline   VGames 

  • Extra Crispy

#3356

Even though this is more of a source related question I didn’t know where to post it so I figured this thread would work. How hard would it be to get sprites being used as decals on walls, floors, or ceiling surfaces take into account the edge of the surface they are on and have the decal bend along with the angle of the surface like decals do in the GZDoom engine? Just wondering if something like this could ever get added to a future eduke release so that decals don’t stick out when they reach the edge of a wall or something.
0

User is offline   Radar 

  • King of SOVL

#3357

Hard.
0

User is offline   VGames 

  • Extra Crispy

#3358

I figured it was difficult since it’s never been implemented. Is it something that would require a full rework of something that everything depends on? I’m just curious. I have no idea how it all works engine wise.
0

User is offline   Aleks 

#3359

 VGames, on 13 August 2023 - 07:58 PM, said:

Even though this is more of a source related question I didn’t know where to post it so I figured this thread would work. How hard would it be to get sprites being used as decals on walls, floors, or ceiling surfaces take into account the edge of the surface they are on and have the decal bend along with the angle of the surface like decals do in the GZDoom engine? Just wondering if something like this could ever get added to a future eduke release so that decals don’t stick out when they reach the edge of a wall or something.

You can always just use two sprites for a decal around an angled corner that would seam where the two walls meet. Implementing this from the engine side, leaving aside the difficulties with it, would break a lot of details which rely on "cutting" a sprite with a wall.
0

User is offline   Danukem 

  • Duke Plus Developer

#3360

 Aleks, on 14 August 2023 - 12:44 PM, said:

You can always just use two sprites for a decal around an angled corner that would seam where the two walls meet. Implementing this from the engine side, leaving aside the difficulties with it, would break a lot of details which rely on "cutting" a sprite with a wall.


I'm pretty sure he was asking because he has big decals spawned by projectiles during gameplay. What you are suggesting sounds like a mapper solution and wouldn't help.

AFAIK there is no data in the engine for determining when a decal is hanging over an edge, let alone any rendering capability for "bending" a flat sprite.

When addressing this issue in my own projects, because of large rocket scorch decals, the best I could come up with was to try and detect nearby edges by testing for wall/sector changes at certain distances in various directions from the decal when it spawns, then reducing its size accordingly or simply deleting it.
0

User is offline   VGames 

  • Extra Crispy

#3361

View PostDanukem, on 14 August 2023 - 08:45 PM, said:

I'm pretty sure he was asking because he has big decals spawned by projectiles during gameplay. What you are suggesting sounds like a mapper solution and wouldn't help.

AFAIK there is no data in the engine for determining when a decal is hanging over an edge, let alone any rendering capability for "bending" a flat sprite.

When addressing this issue in my own projects, because of large rocket scorch decals, the best I could come up with was to try and detect nearby edges by testing for wall/sector changes at certain distances in various directions from the decal when it spawns, then reducing its size accordingly or simply deleting it.


Yeah I was referring to non mapping methods of keeping decals from hanging over wall or floor edges. I’ve adopted this method of yours Dan. It’s very useful and works for the most part. I was just curious about having something similar to what u see in modern engines when it comes to decals wrapping around corners. Thanks for the info.
0

User is offline   VGames 

  • Extra Crispy

#3362

I noticed when I start a map sometimes sound effects like weapon firing sounds will cause the game to have a real quick drop in frame rate. It’s very quick and doesn’t cause much issue but it is noticeable. I’ve seen people using GZDOOM talk about this happening to them as well and they said it was the sound effect getting added to RAM. Since there isn’t a way to precache sound effects in GZDOOM they work around this by playing sound effects during the loading screen. Is this something that could be done with eduke or is there a better way to go about keeping sound effects from causing the game to stutter when being played for the first time?
0

User is offline   Danukem 

  • Duke Plus Developer

#3363

tbh the issues I've had with *images* loading in and causing terrible lag/stuttering overshadow sound issues to such a degree that I've never thought about it. But I guess you could try using the screensound command in events before gameplay to see if that does anything
1

User is offline   VGames 

  • Extra Crispy

#3364

I've noticed something very odd. When you set the player's Z position to make them appear taller as if they are in a big mech it causes enemies to do self-damage to themselves.

getsector[THISACTOR].floorz Z
addvar Z -34500
setp[].posz Z


Code like above causes the enemies to die when shooting at you while your z position is being set manually to a higher-than-normal setting. Even using the add cameraz command instead causes the same issue but it's not ideal since it makes the weapon projectile offsets all messed up. Has anybody noticed this before and is there a work around? I tried adding health to the enemies when they shoot at you while you are this high up, but they still die. Even setting their health to their maximum amount constantly does nothing. They still die over time. I've also tried reducing the amount of added height and it still causes the enemies to kill themselves even at much lower settings.

This post has been edited by VGames: 06 September 2023 - 04:35 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#3365

I wonder if they are shooting themselves because they are aiming almost straight up to hit the player.
0

User is offline   VGames 

  • Extra Crispy

#3366

The thing is I’m no higher than I would be if I was up on the ledges in la rumble or other maps. I don’t recall them dying when I’m higher up than them like that in those situations. -34500 Z puts me about 2 stories high. That’s really not that high up.
0

User is offline   Danukem 

  • Duke Plus Developer

#3367

In any case, you should be setting the player's posz in relation to the base of the mech, not the floorz. The mech could be standing on a sprite bridge, or there could be a sloped floor, or it could be falling or jumping, any of those situations would make your placement wrong.
0

User is offline   VGames 

  • Extra Crispy

#3368

View PostDanukem, on 06 September 2023 - 10:42 PM, said:

In any case, you should be setting the player's posz in relation to the base of the mech, not the floorz. The mech could be standing on a sprite bridge, or there could be a sloped floor, or it could be falling or jumping, any of those situations would make your placement wrong.


Yeah I’m doing that now. I was already doing it that way for my tank and switched to that method for the mech too. Thanks
0

#3369

Something weird about the recon's sounds
onevent EVENT_SOUND
  ifactor RECON
	ifactorsound THISACTOR RECO_ATTACK 
	  set RETURN -1
endevent

still plays the sound

  ifactor RECON
	ifactorsound THISACTOR RECO_ATTACK 
	  set RETURN PRED_PAIN
endevent

plays both RECO_ATTACK and PRED_PAIN




onevent EVENT_SOUND
  ifactor RECON
	ifactorsound THISACTOR RECO_ATTACK 
        {
	  set RETURN -1
          spawn BOSS1
        }
endevent

every battlelord in the game shows up
0

User is offline   VGames 

  • Extra Crispy

#3370

Are u trying to stop the RECO_ATTACK sound from playing? Would stopsound work?

This post has been edited by VGames: 12 September 2023 - 11:32 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#3371

View Postlllllllllllllll, on 12 September 2023 - 10:44 AM, said:

Something weird about the recon's sounds
onevent EVENT_SOUND
  ifactor RECON
	ifactorsound THISACTOR RECO_ATTACK 
	  set RETURN -1
endevent

still plays the sound

  ifactor RECON
	ifactorsound THISACTOR RECO_ATTACK 
	  set RETURN PRED_PAIN
endevent

plays both RECO_ATTACK and PRED_PAIN




onevent EVENT_SOUND
  ifactor RECON
	ifactorsound THISACTOR RECO_ATTACK 
        {
	  set RETURN -1
          spawn BOSS1
        }
endevent

every battlelord in the game shows up


From your description, a logical explanation would be that two copies of the sound are being played. One copy is an actor sound and another is a global sound or at least is not owned by the recon sprite.
0

User is offline   VGames 

  • Extra Crispy

#3372

@ Danukem - check your PM's
0

#3373

Stopactorsound makes it sometimes play, sometimes play partway before cutting off.
I replaced the voc in RECO_ATTACK's entry with blank.voc

It's just I wonder why it fires so many times with each shot while at the same time won't null the sound.
The bit for spawning boss1 should be limited to only sounds played by the recon and only RECO_ATTACK. Do sounds played from hardcode at the same time mess with the event->RETURN order of things?
0

User is offline   VGames 

  • Extra Crispy

#3374

Ok so I'm trying to get the number of babes saved and number of babes not saved to show up on the end of map screen where all the completed map stats are displayed. I got it all to work great and everything is aligned and shows up as it should according to the original pace that the original stats pop up. It looks great but I want the babes saved stats to show up immediately like all the other stats do when any button is pressed. No matter what I do the getinput bits stuff will not register correctly with EVENT_DISPLAYBONUSSCREEN. I must be doing something wrong, or it doesn't work that way in that event. When I search for inputs in EVENT_GAME using the exact same code for Buttons1 and Buttons2 seen below the babes saved stats show up immediately when the end of map screen is shown. There is no delay as there should be for those stats. I'd like to keep the getinput stuff in the EVENT_DISPLAYBONUSSCREEN. Please tell me what I'm doing wrong.

appendevent EVENT_DISPLAYBONUSSCREEN // ************************************************************************************

rotatesprite -29 100 35000 0 7164 0 0 4096 windowx1 windowy1 windowx2 windowy2
rotatesprite 347 100 35000 1024 7164 0 0 4100 windowx1 windowy1 windowx2 windowy2

ifvarn BABESDELAY 1000
{
	getinput[].bits Buttons1
	getinput[].extbits Buttons2

	ifvarand Buttons1 1
		setvar BABESDELAY 1000

	ifvarand Buttons2 1
		setvar BABESDELAY 1000

	ifvarl BABESDELAY 400
		addvar BABESDELAY 1

	ifvarge BABESDELAY 352
	{	
		screentext 2837 67 170 65536 0 0 192 0 0 4096 0 4 8 1 0 524290 0 0 xdim ydim
		screentext 2837 62 180 65536 0 0 193 0 0 4096 0 4 8 1 0 524290 0 0 xdim ydim
	}

	ifvare BABESDELAY 380
		sound RPG_EXPLODE

	ifvarge BABESDELAY 385
	{
		redefinequote 174 %d%d
		qsprintf 174 174 BABESSAVED
		screentext 2837 158 170 65536 0 0 174 0 0 4096 0 4 8 1 0 524290 0 0 xdim ydim

		redefinequote 174 %d%d
		qsprintf 174 174 BABESTOTAL
		screentext 2837 158 180 65536 0 0 174 0 0 4096 0 4 8 1 0 524290 0 0 xdim ydim
	}
}
else
{
	screentext 2837 67 170 65536 0 0 192 0 0 4096 0 4 8 1 0 524290 0 0 xdim ydim
	screentext 2837 62 180 65536 0 0 193 0 0 4096 0 4 8 1 0 524290 0 0 xdim ydim

	sound RPG_EXPLODE

	redefinequote 174 %d%d
	qsprintf 174 174 BABESSAVED
	screentext 2837 158 170 65536 0 0 174 0 0 4096 0 4 8 1 0 524290 0 0 xdim ydim

	redefinequote 174 %d%d
	qsprintf 174 174 BABESTOTAL
	screentext 2837 158 180 65536 0 0 174 0 0 4096 0 4 8 1 0 524290 0 0 xdim ydim
}

endevent // ************************************************************************************


0

#3375

If you can't get button presses to work you might be able to do the opposite which is to keep increasing the delay of the babe stats messages while testing for changes to the stats screen indicating the player has pressed something. Then the babe stats appear when no further delay is being added.
0

User is offline   VGames 

  • Extra Crispy

#3376

View Postlllllllllllllll, on 12 September 2023 - 05:42 PM, said:

If you can't get button presses to work you might be able to do the opposite which is to keep increasing the delay of the babe stats messages while testing for changes to the stats screen indicating the player has pressed something. Then the babe stats appear when no further delay is being added.


That’s a good idea. I can maybe detect the explosion sound that plays when all of the original stats are fully displayed when a button is pressed. I don’t think it just makes the rpg_explode sound.
0

#3377

I noticed that when duke is within a small number of sectors away from an enemy that their pathing suddenly becomes much sharper. Can this number be accessed for individual sprites?


I've been trying to make an invisible projectile become visible or visible projectiles become tempoarily invisible with no luck. Using cstat or .cstat or flags, doing it from event/eshoot/the projectile etc. it doesn't seem possible.
It is to hide the projectile appearing to spawn behind the actor when viewed from the side. Making it originate further forward causes it to shoot around obstructions that should be blocking the projectile and to miss targets at pointblank. When I use movesprite it is either colliding with the actor firing it or the first frame is always visually in the original spot before the shift occurs.
Because the tile art is leaning forward and the projectile has side views the offset is pretty big.

Setting it to switch to a new action after x ticks/actions/count/distance, or having a projectile shoot a projectile didn't work either.
0

Share this topic:


  • 124 Pages +
  • « First
  • 111
  • 112
  • 113
  • 114
  • 115
  • Last »
  • 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