
EDuke32 Scripting "CON coding help"
#3334 Posted 27 June 2023 - 01:35 PM
#3335 Posted 28 June 2023 - 04:31 AM
#3336 Posted 29 June 2023 - 12:14 PM
#3337 Posted 30 June 2023 - 06:21 AM
This post has been edited by Mark: 30 June 2023 - 06:23 AM
#3338 Posted 30 June 2023 - 11:07 AM
Mark, on 30 June 2023 - 06:21 AM, said:
Just a quick and dirty attempt without testing:
appendevent EVENT_DISPLAYROOMS ifp ponground ife sector[player[].cursectnum].lotag 1 add cameraz 1024 endevent
See if that works.
#3339 Posted 30 June 2023 - 12:09 PM
lllllllllllllll, on 29 June 2023 - 12:14 PM, said:
Presumably there is already a sprite in said sector for his EVENT_GAME code, he just doesn't know which wall to reference. And he didn't give any context so I'm not going to waste time guessing solutions to an unstated problem.
#3340 Posted 30 June 2023 - 02:24 PM
#3341 Posted 30 June 2023 - 03:01 PM
Danukem, on 30 June 2023 - 11:07 AM, said:
appendevent EVENT_DISPLAYROOMS ifp ponground ife sector[player[].cursectnum].lotag 1 add cameraz 1024 endevent
See if that works.
I'm half way there using your suggestion. When I enter the water from land I drop down to the lower height I wanted. 1024 was just right. but when I come back up from underwater I'm back to default onwater height. I'm going to doublecheck my SE placement above water to make sure it isn't raised when it shouldn't be.
edit: the above water SE is where it should be.
This post has been edited by Mark: 30 June 2023 - 03:23 PM
#3342 Posted 30 June 2023 - 09:19 PM
Mark, on 30 June 2023 - 03:01 PM, said:
edit: the above water SE is where it should be.
I guess emerging from the water is screwing with the results of ifp ponground
We will need to put in something home-brewed to replace that and give consistent results
#3343 Posted 30 June 2023 - 09:57 PM
appendevent EVENT_DISPLAYROOMS ife sector[player[].cursectnum].lotag 1 { getflorzofslope player[].cursectnum player[].posx player[].posy RETURN sub RETURN cameraz ifg RETURN 2048 ifl RETURN 6144 add cameraz 1280 set RETURN 0 } endevent
#3344 Posted 01 July 2023 - 05:10 AM
Unrelated but playing around with water stuff reminded me of something I noticed a looong time ago and that was the ability to press jump when on water and the player is then at a slightly higher Z until it resets itself by going underwater again or up on land. I'm thinking it was discussed way back then but I can't recall what became of the discussion.
This post has been edited by Mark: 01 July 2023 - 05:16 AM
#3345 Posted 01 July 2023 - 11:38 AM
Mark, on 01 July 2023 - 05:10 AM, said:
Unrelated but playing around with water stuff reminded me of something I noticed a looong time ago and that was the ability to press jump when on water and the player is then at a slightly higher Z until it resets itself by going underwater again or up on land. I'm thinking it was discussed way back then but I can't recall what became of the discussion.
I actually don't know what you want then because I tested that code and it seemed fine. Yes it is true that jumping in the water will reset the height -- in fact you can end up lower in the water that way as well. You might have to do a full override of the water floating code to create your own custom code from scratch.
#3346 Posted 01 July 2023 - 02:13 PM
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.
This post has been edited by Mark: 01 July 2023 - 02:22 PM
#3347 Posted 01 July 2023 - 02:21 PM
EDIT: that might clip the player through the floor though depending on how he sits on the water
This post has been edited by Danukem: 01 July 2023 - 03:16 PM
#3348 Posted 01 July 2023 - 02:53 PM
Mark, on 01 July 2023 - 02:13 PM, said:
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
#3349 Posted 01 July 2023 - 04:09 PM
ck3D, on 01 July 2023 - 02:53 PM, said:
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.
#3350 Posted 12 July 2023 - 04:40 PM
#3351 Posted 17 July 2023 - 11:27 AM
#3353 Posted 17 July 2023 - 03:15 PM
#3354 Posted 12 August 2023 - 02:40 AM
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
#3355 Posted 12 August 2023 - 12:46 PM
zazo, on 12 August 2023 - 02:40 AM, said:
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.
#3356 Posted 13 August 2023 - 07:58 PM
#3358 Posted 14 August 2023 - 07:48 AM
#3359 Posted 14 August 2023 - 12:44 PM
VGames, on 13 August 2023 - 07:58 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.
#3360 Posted 14 August 2023 - 08:45 PM
Aleks, on 14 August 2023 - 12:44 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.
#3361 Posted 15 August 2023 - 04:34 AM
Danukem, on 14 August 2023 - 08:45 PM, said:
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.