Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

1 hour ago, STRUNK said:

@JackFarmer

I mimicked a func_bobbing with the experimental func_mover_dragofer and it works if not set to interuptable: so the up or down movement always completes after shutting it off.

It's essentially what you could do with a sliding door, but with this func_mover you can set acc- decelleration time, so it looks like a func bobbing. It is triggerd by a trigger_timer, set to 0.1 sec longer then the move time of the func_mover, so it keeps bobbing when the trigger_timer is activated. Deactivate the trigger_timer and the bobbing stops.

https://streamable.com/7onrf

 

Bobbing.pk4 4.46 kB · 2 downloads

Thank you for that. However, I do not get the pk4 working (if I use the lever, nothing happens). You sure this is the same setup as in the video?

Edited by JackFarmer
Link to comment
Share on other sites

@JackFarmer

It should be the same. I reuploauded the file. Can you try it again? (Put the folder in the fms folder, open TDM > new mission > choose Bobbing > install missiion, then open the console and enter: testmap bob )

Is the blue thing a func_mover_dragofer?

Edited by STRUNK
Link to comment
Share on other sites

@STRUNK@JackFarmer @Dragofer

Just thinking about whether func_mover_dragofer  should be added (as an experimental/advanced method) to the  "Objects Floating On Water" wiki page. A drawback I see for the floating use case is that (looking at the video) the stoppage occurs at either of the 2 extremes, when what is desirable for floating is that stoppage always occurs at the midpoint of the range.

Link to comment
Share on other sites

My local copy of func_mover_dragofer, which I've renamed to func_mover_spawnargs, is quite far (500 lines and is designed for being used in complex mover-based puzzles) but still has issues arising from conflicts between my new interruptable sound system and the broken inbuilt sound system of the func_mover entity. Also, during stress testing I noticed an issue when the player frantically frobs multiple moving movers (movers move beyond their final positions), so at the moment only one mover is allowed to move at a time. 

I was thinking of just making a very simple sound system for now (snd_move and snd_stop) and finding a solution for the multi-mover problem, but my main PC broke down some weeks ago so I'm waiting for that to come back in any case.

Link to comment
Share on other sites

1 minute ago, STRUNK said:

maybe there could be a limit on frob/trigger fequency, where only 1 frob in 1 or 2 seconds is taken as an actual trigger .. if possible ..

My implementation was to set a condition that the mover is stationary, otherwise the newly called script should terminate. There are a few ways I can think of to do that:

  1. Use existing functions isMoving and isRotating (plus check whether translation or rotate spawnargs, respectively, have been set)
  2. Create a new float and set it to 1 at the beginning of the script and 0 at the end of the script
  3. Disable the S/R response to frob and trigger at the beginning of the script, enable at the end of the script.

(Toggling frobbability would only disable frobbing but not triggering, so won't be enough)

Come to think of it, I'm not sure if I actually tried all 3 methods during stress-testing, I'll keep that in mind.

  • Like 1
Link to comment
Share on other sites

  

56 minutes ago, Geep said:

@STRUNK@JackFarmer @Dragofer

Just thinking about whether func_mover_dragofer  should be added (as an experimental/advanced method) to the  "Objects Floating On Water" wiki page.

func_mover_spawnargs isn't really designed for continuous movement, but rather for moving upon being triggered or frobbed. As STRUNK shows it can be used for bobbing regardless by automatically triggering it (move duration + 0.1) seconds. So it's a bit of an off-label use.

56 minutes ago, Geep said:

A drawback I see for the floating use case is that (looking at the video) the stoppage occurs at either of the 2 extremes, when what is desirable for floating is that stoppage always occurs at the midpoint of the range.

This is because it's only been set to use 2 positions. You could use 3 positions, but then there'd be 2 phases of acceleration & deceleration per cycle.

What you can do, however, is use a target_setkeyval entity to halve the "translate", "time" and maybe also accelTime and decelTime spawnargs, because the func_mover re-reads its movement spawnargs every time it's set in motion. At least that's the case in my local version of the entity (within my currently unusable HDD), and maybe also in the version I sent to STRUNK in our PMs.

 

Link to comment
Share on other sites

@Dragofer, not sure whether you are proposing that you use target_setkeyval  -

- repeatedly within the trigger_timer loop to keep halving the translate range until it reaches zero, or

- once when the object is at an extreme, to bring it back to the former-midpoint, but now the new end-of-range (but then you'd have to detect which extreme it's at first)

Link to comment
Share on other sites

27 minutes ago, Geep said:

@Dragofer, not sure whether you are proposing that you use target_setkeyval  -

- repeatedly within the trigger_timer loop to keep halving the translate range until it reaches zero, or

- once when the object is at an extreme, to bring it back to the former-midpoint, but now the new end-of-range (but then you'd have to detect which extreme it's at first)

It's option 2, but it doesn't matter when you do it. The next time the script is called it'll read the spawnargs and make them +/- depending on which direction it last moved.

That's for stopping it. If you want to get it to resume bobbing, you'll need to trigger it again to make it go back to its extreme. Then use a 2nd setkeyval to restore its original movement spawnargs, and restart the trigger_timer so it starts bobbing.

A trigger_sequencer could come useful for coordinating all of these triggers.

Link to comment
Share on other sites

I tried downloading the original bobbing.pk4, but couldn't then open it up as a zip. Oh well, not so important at the moment. @Dragofer, when it becomes stable, please send me a copy to play around with in the floating context.  I'm thinking, possibly it could be packaged up with the triggers as a on/off bobbing prefab?

Link to comment
Share on other sites

18 hours ago, STRUNK said:

@JackFarmer

Nice!! Also thank @Dragofer for the scripting ;)

Do all your puzzles work now?

Correction, it works, but after activatiion DM crashes. Not always, but very often. I have tested the function on two machines with differing hardware configurations. :(

I found the problem: some related readable is causing the crashes.

Edited by JackFarmer
Link to comment
Share on other sites

59 minutes ago, STRUNK said:

@JackFarmer

Maybe replace the def and script files with the ones below, where I got rid off a lot of code  that you don't need.

custom_func.def 2.69 kB · 0 downloads tdm_reusable_script.script 2.07 kB · 0 downloads

I am afraid the crashing comes from the map's complexity as copying the relevant assets (map of_entities) to a test map shows that everything works as it should. :(

 

Edited by JackFarmer
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...