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

Jump to content

  • 119 Pages +
  • « First
  • 116
  • 117
  • 118
  • 119
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   VGames 

#3511

View Postlllllllllllllll, on 01 July 2024 - 09:56 AM, said:

Adding lines for precache 0 did remove lag from sprites placed in the map even though it was caching the map before play


Ok I'll go ahead and keep the commands then. I don't think it hurts anything either way.
0

User is offline   VGames 

#3512

I noticed that when the player is shrunk useractor enemies do not track the player's position like the other original enemy actors do. Is there a way to get useractor enemies to track the player's position like the originals? I'm trying to get small spider actors to track the player position when they are shrunk but they seem to ignore the player altogether.
0

User is online   Danukem 

  • Duke Plus Developer

#3513

View PostVGames, on 05 August 2024 - 03:23 PM, said:

I noticed that when the player is shrunk useractor enemies do not track the player's position like the other original enemy actors do. Is there a way to get useractor enemies to track the player's position like the originals? I'm trying to get small spider actors to track the player position when they are shrunk but they seem to ignore the player altogether.


One thing to be aware of is that ifp palive returns false when the player shrunk. So if your enemies check for whether the player is alive before following, that might explain it.


It's instructive to look at the code for NEWBEAST, which is a useractor. Notice that it explicitly will enter its seeking state when the player is shrunk. Once in that state, it does check for whether ifp pdead is true, but only when deciding whether to shoot or scratch. It will not leave the seeking state just because the player is "dead".
1

User is offline   VGames 

#3514

Oh ok that helps a lot. I have been using ifpalive so that must be the issue. Thanks for the clarification.
0

User is offline   VGames 

#3515

How do you check for the height of the ceiling in the current sector that you are in? I thought there was a real easy way to do it but ceilingz isn't exactly what I'm looking for. I'm trying to get the height of the ceiling that you see in mapster when you're pointing at it in 3D mode.
0

User is online   Danukem 

  • Duke Plus Developer

#3516

View PostVGames, on 30 August 2024 - 04:56 PM, said:

How do you check for the height of the ceiling in the current sector that you are in? I thought there was a real easy way to do it but ceilingz isn't exactly what I'm looking for. I'm trying to get the height of the ceiling that you see in mapster when you're pointing at it in 3D mode.


https://wiki.eduke32...Getceilzofslope

You want that one ^ it gives you the celing z at specific x y coordinates
1

User is offline   VGames 

#3517

Doesn't this still return ceilingz? That's not the height of the ceiling, is it? That's more like the z coordinate of the ceiling which could be anything depending on the location of the map. Or am I using it wrong? Maybe I should explain what I'm trying to do. I want to check if the player is in one of those tiny tunnels that you go through when shrunk. How do I check what the height of that ceiling is so that I can make something happen when in those tiny tunnels?
0

User is online   Danukem 

  • Duke Plus Developer

#3518

sounds like what you actually want is how much distance there is between the floor and the ceiling, which means you get both values and subtract
0

User is offline   VGames 

#3519

Oh ok I understand now. Get the floorz and the ceilingz and subtract them to get a number that shows the distance between them. I’ll do that. Thanks for the tip
0

User is online   Danukem 

  • Duke Plus Developer

#3520

View PostVGames, on 31 August 2024 - 04:09 PM, said:

Oh ok I understand now. Get the floorz and the ceilingz and subtract them to get a number that shows the distance between them. I’ll do that. Thanks for the tip


If you are coding in the player actor you can also use the old ifgapzl command -- I think around 48 or less is crouching height

https://wiki.eduke32.com/wiki/Ifgapzl
1

User is offline   VGames 

#3521

I'll take a look at that too. Thanks
0

User is offline   VGames 

#3522

ifgapzl was exactly what I was looking for. Thanks.
0

User is offline   VGames 

#3523

Is it possible to replicate how players playing as the xenomorphs in the Aliens vs Predator franchise can run on walls and the ceiling with Eduke32? If so, has anybody ever done this before and what commands would be helpful to accomplish this?
0

User is online   Danukem 

  • Duke Plus Developer

#3524

There's no one magical code bullet that will make that happen, it's a combination of different tricks and methods, and the game will fight you every step of the way. One thing I'll mention is rotating the screen: https://wiki.eduke32...wiki/Rotscrnang which is useful for both wall running and upside down movement.
0

User is offline   jimbob 

#3525

ok, maybe a stupid question, but how do i trigger an actor using activators or masterswitches?

i can do the inverse with operatemasterswitches and operateactivators, but not "activating" a actor with one of those.

basically i'm trying to make a camera actor that changes the view, plays a little scene, en goes back to its neutral position ( also resets the switch to prevent re-triggering the events )

since the scene will have a random(ish) set of things happening instead of being a one time thing i basically need to have it operate this way.

asa side question, with "tint { pal 0 flags 9 }" applied to all pals, i can make the game run in black and white mode, but that code is initiated in a .defs file, is there a similar function i can use on the fly ingame? it might be fun to have the camera turn the screen to BnW mode.

[edit] it might actually be easier to set up a custom actor with the ifhitspace trigger and run from there..

This post has been edited by jimbob: 01 October 2024 - 05:01 AM

0

User is offline   jimbob 

#3526

i got it working, well mostly. now the hard part starts..but it should be worth it :)
0

User is online   Danukem 

  • Duke Plus Developer

#3527

Don't know what you mean by "trigger" an actor. Activators and masterswitches are hardcoded things. It's possible but inconvenient to set up code such that when a hardcoded thing happens, it sets a var on an actor that with your script will then cause the actor to do something. What I prefer is having something non-hardcoded manipulate the actor, then I have better control over it. My typical setup would be to use the CON commands that trigger activators/masterswitches etc. be part of a code block that also runs a loop on sprites in the map and sets a var on any sharing the same channel (the channel being a var on the actor sprite at this point). So in other words the activator/masterswitch is being triggered by my own code which at the same time finds and communicates to the actor.
0

User is offline   jimbob 

#3528

i meant using a switch to activate an actor like you would do an sector effect like a door, but i was wildly overcomplicating things that way and ended up doing just what you said, making a custom actor that, when used, switches on the camera and activates the activators and whatnots.. only downside is that it does not like having hi or lotags set, it gives very funky results so i hard coded them.
0

User is offline   VGames 

#3529

So, I'm just about done with adding drivable Pigcop Recon vehicles and I added the ability to drop artillery shells while flying it using the FIRE MODE 2 Button. But I got an idea that I'm here to ask about. Is there a way to use a camera to show what's right beneath you and have that feedback displayed directly on the HUD? That way you can see what's below you as you drop bombs. If it's possible what command and variables should I look into? Any examples of this being done before?
0

User is offline   Reaper_Man 

  • Once and Future King

#3530

https://wiki.eduke32.com/wiki/Showview
1

User is offline   VGames 

#3531

View PostReaper_Man, on 13 October 2024 - 03:47 PM, said:



That worked great. Thanks a lot. Is there any way to go beyond -99 for "horiz" so that the camera is looking straight down and is not restricted like the Player's view when looking as far down as possible?
0

User is online   Danukem 

  • Duke Plus Developer

#3532

 VGames, on 14 October 2024 - 01:23 PM, said:

That worked great. Thanks a lot. Is there any way to go beyond -99 for "horiz" so that the camera is looking straight down and is not restricted like the Player's view when looking as far down as possible?


No, it's impossible. Its also not possible to rotate the view in the way that .rotscrnang does on the player which I find to be a frustrating limitation.
0

User is offline   VGames 

#3533

 Danukem, on 14 October 2024 - 07:13 PM, said:

No, it's impossible. Its also not possible to rotate the view in the way that .rotscrnang does on the player which I find to be a frustrating limitation.


Ok thanks for that clarification. I figured it wouldn’t be possible. Still what I got right now is excellent as is. Thanks for the help.
0

User is offline   Reaper_Man 

  • Once and Future King

#3534

The limitation is a fundamental property of the engine's renderer. It's just kind of a literal feature of how rendering natively in BUILD works. This is another cause of where the "2.5D" misconception comes from too.

I'm surprised .rotscrnang works at all. I'd be curious why it can't work with showview, at least on a conceptual level.
0

User is online   Danukem 

  • Duke Plus Developer

#3535

 Reaper_Man, on 15 October 2024 - 05:32 AM, said:

The limitation is a fundamental property of the engine's renderer. It's just kind of a literal feature of how rendering natively in BUILD works. This is another cause of where the "2.5D" misconception comes from too.

I'm surprised .rotscrnang works at all. I'd be curious why it can't work with showview, at least on a conceptual level.


I think it could work but someone has to add the feature. Just my guess though.
0

User is offline   VGames 

#3536

Can showview be used by other actors? Or does this only work when the player calls on it?
0

User is online   Danukem 

  • Duke Plus Developer

#3537

View PostVGames, on 15 October 2024 - 05:33 PM, said:

Can showview be used by other actors? Or does this only work when the player calls on it?


I thought it only worked when used from display events. Are you successfully using it in the player actor code?
0

User is offline   VGames 

#3538

View PostDanukem, on 15 October 2024 - 07:44 PM, said:

I thought it only worked when used from display events. Are you successfully using it in the player actor code?


No my mistake. I forgot to mention I’m using it in the HUD code. One of the display events. Still couldn’t u link it to an actor this way? Like if I had the player spawn an actor behind them and have the showview use that actor’s coordinates so that the screen is showing a better view of what’s actually beneath the player? But still call on showview in the HUD code?
0

User is offline   Reaper_Man 

  • Once and Future King

#3539

Yes, you can use another actor's coordinates as the coordinates for showview, essentially making a camera of their perspective.

The way you are phrasing this is very weird and doesn't make a lot of sense. I would not describe this as the actor "using" showview, and the showview command does not have any properties referencing sprite ID in the first place.
0

User is offline   VGames 

#3540

View PostReaper_Man, on 16 October 2024 - 04:29 AM, said:

Yes, you can use another actor's coordinates as the coordinates for showview, essentially making a camera of their perspective.

The way you are phrasing this is very weird and doesn't make a lot of sense. I would not describe this as the actor "using" showview, and the showview command does not have any properties referencing sprite ID in the first place.


Yeah I guess I worded it wrong. I meant you can use another’s actors coordinates besides the players for the showview command.
0

Share this topic:


  • 119 Pages +
  • « First
  • 116
  • 117
  • 118
  • 119
  • 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