Jump to content
The Dark Mod Forums

Dragofer's Scripting


Dragofer

Recommended Posts

On 7/17/2020 at 5:58 PM, Dragofer said:

C ) Mass Teleport

So the entities get teleported to the exact location as they were, but then in the new room, right?

Also, does the room have to be absolutely the same or could some stuff be a little different?

Another question:

Could the script also work with a trigger facing?

Link to comment
Share on other sites

1 hour ago, datiswous said:

So the entities get teleported to the exact location as they were, but then in the new room, right?

Also, does the room have to be absolutely the same or could some stuff be a little different?

Another question:

Could the script also work with a trigger facing?

The illusion works best if the 2 rooms are completely identical. The player and moveable entities have their origins modified by the vector between the 2 rooms so they'll end up in the same location over there.

Regarding the triggers, you need a reliable way of triggering the teleportation before the player reaches the far side of the room and notices the dead end. If it's just a trigger_facing the player might walk sideways/backwards and not activate the trigger. Also, the trigger zones should not overlap, otherwise the player will get endlessly teleported back and forth.

The trigger_touch is just needed to register all entities inside the room so they can be teleported.

  • Like 1
Link to comment
Share on other sites

19 hours ago, Dragofer said:

I do usually make test FM archives for each asset, as it helps make sure that all custom assets are in place. When I release an asset it's basically that archive minus the maps folder. I could try to dig the maps up again.

Why not. I am thinking of mappers, wishing to try/test your new toys without much hassle.

19 hours ago, Dragofer said:

The assets are usually made for missions, so you can also find the assets in there (presence lamp in Painter's Wife, camgoyles in Written in Stone, automaton station in The Anomaly, the audiograph and teledoors feature in WIPs).

Excellent. Thanks for your work.

TDM Modpack 4.0

Link to comment
Share on other sites

On 11/16/2022 at 5:12 PM, snatcher said:

Why not. I am thinking of mappers, wishing to try/test your new toys without much hassle.

I've in any case found some test maps I used to develop the respective features, they should work if you also have the .pk4:

presence.mapcamgoyle.mapaudiograph.map

If you're looking for a kind of demonstration map to showcase all the features, though, that'd be a fair amount of hassle to make, on top of the time I already put into documenting the spawnargs, commenting the scripts, writing the wiki articles and creating prefabs.

  • Like 1
Link to comment
Share on other sites

1 hour ago, snatcher said:

Out of curiosity I tried to load the audiograph map in TDM with no success. Anyway, I am sure mappers know their way around (I am unable to build anything in DarkRadiant).

Looking forward to see your latest creations in missions.

Thanks.

Just need to make sure you have the audiograph "FM" installed so that it loads the custom assets from the .pk4.

Link to comment
Share on other sites

  • 6 months later...
On 11/19/2022 at 9:33 PM, snatcher said:

Out of curiosity I tried to load the audiograph map in TDM with no success. Anyway, I am sure mappers know their way around (I am unable to build anything in DarkRadiant).

Not sure if you got it working, but I got it working by simply putting the audiograph.map file inside the maps folder and then in tdm open the console and type dmap audiograph and after type map audiograph . This probably automatically works because the resources are now in core already.

Edited by datiswous
Link to comment
Share on other sites

  • 1 month later...

New script for mappers: my flavour of a fog density fading script.

To add this to your FM, add the line "thread FogIntensityLoop();" to your map's void main() function (see the example in fogfade.script) and set "fog_fade" "1" on each foglight to enable script control of it.

Set "fog_intensity_multiplier" on each info_location entity to change how thick the fog is in that location (practically speaking it's a multiplier for visibility distance). Lastly, "fog_fade_speed" on each foglight determines how quickly it will change its density. The speed scales with the current value of shaderParm3, using shaderParm3 = 1000 as a baseline. So i.e. if shaderParm is currently at 1/10th of 1000, then fade speed will be 1/10th as fast.

Differences to Obsttorte's script: https://forums.thedarkmod.com/index.php?/topic/14394-apples-and-peaches-obsttortes-mapping-and-scripting-thread/&do=findComment&comment=310436

  • my script uses fog lights you created, rather than creating one for you. Obsttorte's script will delete the foglight if entering a fogfree zone and recreate it later
  • more than one fog light can be controlled (however, no per-fog-light level of control)
  • adding this to the map requires adding a line to your void main() script, rather than adding an info_locations_settings entity with a custom scriptobject spawnarg
  • in my script, mappers set a multiplier of fog visibility distance (shaderParm3), while in Obsttorte's script a "fog_density" spawnarg is used as an alternative to shaderParm3
  • smaller and less compactly written script

fogfade.scriptfogfade.map

 

  • Like 2
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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • 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
×
×
  • Create New...