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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...