Duke4.net Forums: Effector extensions & co. - Duke4.net Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Effector extensions & co.  "How to get what you want without being a con man"

User is offline   Danukem 

  • Duke Plus Developer

#31

On the subject of easy wins, how hard would it be to add an option to make the top speed of a subway train faster? The default speed isn't bad, but sometimes you want a train you can't keep up with by strafe-running.
2

User is offline   TerminX 

  • el fundador

  #32

Potentially not too difficult, assuming 1) the speed is currently intentionally capped to something lower than the max range of the value, and 2) the speed isn't capped there to sidestep some insurmountable issue with the code as written. For some reason, the concept of glitched subway trains where Duke ends up inside of them instead of getting run over sounds like a very realistic Duke Nukem 3D-style outcome. :P
0

User is offline   oasiz 

  • Dr. Effector

#33

I think subway trains use sector.extra.
This is why the drop floor trick will simply gradually stop the subway trains and not move it after.
I believe also the station stop delay took some cues from this tag.

There is that space ship video I did ages ago where it slows down and stops firing as it uses sector.extra to seed the RNG too I think.
All it does in the case of the vid is a wallcrack tied to it's activation and some parallax trickery to make it look like it's "falling"
0

User is offline   brullov 

  • Senior Artist at TGK

#34

Sorry for the offtopic. I am currently learning level design for Doom and I've noticed a cool feature for the editor — grid wall alignment. You can easily align the grid to the diagonal wall and build diagonal sectors. Is it possible to implement it in Mapster?
0

User is offline   oasiz 

  • Dr. Effector

#35

This would be something for mapster32 specifically as a script and not game side. I would need to know more of such feature to really say what to do with it.
2D editor side is quite of a nasty mess
0

User is offline   brullov 

  • Senior Artist at TGK

#36

View Postoasiz, on 22 August 2022 - 12:45 AM, said:

This would be something for mapster32 specifically as a script and not game side. I would need to know more of such feature to really say what to do with it.
2D editor side is quite of a nasty mess


The idea is to rotate the grid in 2D mode and align it to any wall angle:

Posted Image
0

User is offline   oasiz 

  • Dr. Effector

#37

Yeah, no.
There is that 3D wireframe in 2D mode with F3 IIRC but that doesn't allow editing.
I expect it to require a bunch of changes for such.

There might be a distant way to redraw the grey grid lines from different coordinates I guess
0

User is offline   Aleks 

#38

Guess for now you're left with the good ol' Alt+< or LShift+RMB, Brullov :P
0

User is offline   brullov 

  • Senior Artist at TGK

#39

What about SE12 which affects only wall/floor/ceiling? Would be cool to create a scripted/delayed light sequence too.
0

User is offline   oasiz 

  • Dr. Effector

#40

It's on my list
1

#41

Only things I've run into for effectors lacking are light switches: not affecting the lower texture of surfaces with 2 texture bit enabled, being unable to exclude a ceiling/floor from being affected, and incorrect shade values being applied when using the light switch repeatedly,
and water sectors: being unable to house most doors (where the water is the threshold)
0

User is offline   oasiz 

  • Dr. Effector

#42

Not affecting 2'd walls is because you need to light up the other side of it (2 simply steals the wall properties from the other side), this has to do with how the map is stored, it's a space saving trick.
Water sectors as in over or under?
Since water sectors use sector lotag, it does kind of limit on what can be done.
0

#43

View Postoasiz, on 29 August 2022 - 01:01 AM, said:

Water sectors as in over or under?
Since water sectors use sector lotag, it does kind of limit on what can be done.


Over, a slide door in a flooded room for example- the sector occupied by the door cannot be tagged as water due to it being needed to define the door.
You can mimic ceiling/floor doors with z drops but they don't respond to Use. I'm not sure what happens when you try to surface into a water sector with a dropped ceiling though


When you use over/under for something like a rotating door there's no problem as long as you make a corresponding door in both sectors and link them
0

User is offline   oasiz 

  • Dr. Effector

#44

Yeah, you won't be able to do much with doors in that case. It would require re-working the tagging system (or tons of duplicate code).
Unfortunately almost everything that moves horizontally (x/y in 2D) needs a sector tag one way or another.
0

User is offline   Reaper_Man 

  • Once and Future King

#45

I don't know how the actual code is written that controls this and would make this viable or not, but I wonder if you could set it up like the sector locking lotag, which just adds 16384 to the current sector tag to lock it. So like any tag + 32768 would also function as above water, tag + 49152 would also function as under water.
0

User is offline   Aleks 

#46

View Postlllllllllllllll, on 29 August 2022 - 04:06 PM, said:

Over, a slide door in a flooded room for example- the sector occupied by the door cannot be tagged as water due to it being needed to define the door.
You can mimic ceiling/floor doors with z drops but they don't respond to Use. I'm not sure what happens when you try to surface into a water sector with a dropped ceiling though


When you use over/under for something like a rotating door there's no problem as long as you make a corresponding door in both sectors and link them


For the slide door, you can just make the moving door sector itself red-walled and tagged 25, unless there's player space within that sector, then it shouldn't interfere with being underwater. If you want e.g. movable boxes underwater that you can swim over and that move with the slide door effect, remember you can tag the sector with ST2, put SE15 on it, then make a dummy slide door somewhere off map (can be even a separate 3-walls sector in a far corner of the map, unreachable for the player, with ST25 and SE15 in it), link the hitags on both SE15 sprites and your box will move along with the other slide door. However, a slide door without ST25 won't operate when pressing use next to it, so you'll either have to activate it with a switch (e.g. a crane or something that moves the box) or use textures marked as "DOORTILE" over the sides of the box, then add lotags to these walls (outer walls of the box) corresponding to the activator in the dummy ST25 sector).
0

User is offline   MC84 

#47

Perhaps there are workarounds for this feature already - but is it in the realm of possibility to have touchplates that will only 'be active' once a secondary activator/switch is flicked? Say I want to make an area more dynamic, and instead of having a door/ambush occur on the player's initial path through the area, the touchplate is only activated/armed once a switch is flicked. I've included an image to make things clearer.

Attached thumbnail(s)

  • Attached Image: example.png

0

User is offline   Danukem 

  • Duke Plus Developer

#48

View PostMC84, on 09 September 2022 - 01:08 AM, said:

Perhaps there are workarounds for this feature already - but is it in the realm of possibility to have touchplates that will only 'be active' once a secondary activator/switch is flicked? Say I want to make an area more dynamic, and instead of having a door/ambush occur on the player's initial path through the area, the touchplate is only activated/armed once a switch is flicked. I've included an image to make things clearer.


That could be done easily enough in CON at least. Just make a RESPAWN with lotag the channel of the switch, and hitag equal to TOUCHPLATE, then set EXTRA to the tag you want the spawned plate to trigger -- all the code would have to do is move the EXTRA tag over to the lotag on the spawned plate.
1

User is offline   Danukem 

  • Duke Plus Developer

#49

gamevar extrasaved 0 2

onevent EVENT_LOADACTOR
  ifactor RESPAWN ifn sprite[].extra -1 geta[].extra extrasaved
endevent

onevent EVENT_EGS
  ifactor TOUCHPLATE
{
  seta[].lotag actorvar[sprite[].owner].extrasaved
  sizeat 16 16
  cstat 32768
}
endevent


I think that's all the code required. I'm making a few assumptions -- e.g. that spawning a TOUCHPLATE doesn't simply crash the game, and that it isn't necessary for the TOUCHPLATE data to be moved into some other area prior to gameplay.
1

User is offline   oasiz 

  • Dr. Effector

#50

I haven't checked the code yet but it's mostly about being able to store a channel as most "sprite variables" get erased on map load.
Perhaps the _temp stuff could be used to store this.
0

User is offline   MC84 

#51

View PostDanukem, on 09 September 2022 - 03:22 AM, said:

I think that's all the code required. I'm making a few assumptions -- e.g. that spawning a TOUCHPLATE doesn't simply crash the game, and that it isn't necessary for the TOUCHPLATE data to be moved into some other area prior to gameplay.


Thanks Dan - I'm sure CON wise it's a simple problem to solve. I am slowly working through a C programming course so I will save a screenshot of your code for future use when my knowledge of the subject has improved.

EDIT - I couldn't resist and gave it a try. Works great! thank you

This post has been edited by MC84: 09 September 2022 - 12:44 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#52

View Postoasiz, on 09 September 2022 - 05:28 AM, said:

I haven't checked the code yet but it's mostly about being able to store a channel as most "sprite variables" get erased on map load.
Perhaps the _temp stuff could be used to store this.


I just tested the code that I posted and it works. The only drawback is that you can see a transporterstar when the TOUCHPLATE is spawned, but that can easily be avoided by adding a line to the TRANSPORTERSTAR actor.
0

User is offline   MC84 

#53

View PostDanukem, on 09 September 2022 - 01:06 PM, said:

I just tested the code that I posted and it works. The only drawback is that you can see a transporterstar when the TOUCHPLATE is spawned, but that can easily be avoided by adding a line to the TRANSPORTERSTAR actor.


OK well that can be my homework
0

User is offline   Danukem 

  • Duke Plus Developer

#54

View PostMC84, on 09 September 2022 - 01:27 PM, said:

OK well that can be my homework


Here I'll save you the trouble, add this code:

onevent EVENT_SPAWN
  ifactor TRANSPORTERSTAR
  ifspawnedby RESPAWN
	ifn actorvar[sprite[].owner].extrasaved 0 killit
endevent


Note that EVENT_SPAWN is a different event from EVENT_EGS and it needs to be.
1

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • 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