Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

I am using location settings; so you are saying to create one more a few units apart? Ok will give it a go. Thanks

You can also modify the sript for the location system to allow it to play several sounds at a time.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

@buck oh I thought you were using speakers, I'm unsure if it will work with the location system

Link to comment
Share on other sites

Is there any way to have two snd_ files playing in the same location, at the same time? I'm trying to get thunder, and Gregorian church to play in unison. I haven't seen where that can be done yet? Maybe I

just missed it.Thanks in advance.

 

What I'd do probably would be to use the location system normally for the gregorian, and for the thunder use the call_on_entry and call_on_exit spawnargs on the location entity. This means to call a one-line script to activate/deactivate the entity used in the thunder skybox to regularly trigger the thunder sound.

 

All the script needs to be is sys.trigger($ThunderTrigger'sName);. If you haven't done something with scripts before that would be a good intro.

 

 

 

 

Link to comment
Share on other sites

Dragofer said: All the script needs to be is sys.trigger($ThunderTrigger'sName);. If you haven't done something with scripts before that would be a good intro.

 

I have not and I agree that would be a good place to start. Thanks

Quando omni flunkus moritati" ("When all else fails, play dead")

Halloween Contest Winner 2014

Link to comment
Share on other sites

Functions that get called via the above mentioned method get the location_entity as argumetn and do not return a value. So they look like this

void functionname(entity zone)
{
  ... // your code here
}

As the zone gets passed as an argument, you can readout spawnargs on them. So if you want to use this for several locations, you only need to write one script.

 

These functions need to be defined in the main map script, so a text document with script-ending which carries exactly the same name as your map file (except the ending, of course) and which must contain the following function:

void main()
{
}

The code in this function gets executed at mission start (after the player presses fire). If you don't want to do something here, leave the function empty.

 

EDIT:

If you want to find out in which location the player currently is outside of those functions, you can use the following function:

entity zone = $player1.getLocation(); //don't forget the $ in front of the player1 (that's the name of the player entity) and the ; at the end

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Goldwell Posted Today, 12:06 PM

@buck oh I thought you were using speakers, I'm unsure if it will work with the location system

 

NP. I tried speakers and the results weren't good. I use the location system as recommended. I guess it's time I tried some scripting. :huh:

Quando omni flunkus moritati" ("When all else fails, play dead")

Halloween Contest Winner 2014

Link to comment
Share on other sites

NP. I tried speakers and the results weren't good. I use the location system as recommended. I guess it's time I tried some scripting. :huh:

The location system plays the sound on a channel focused on the player, so it won't change if you move. The result of a sound coming from a speaker does obviously not behave like that.

 

It may be worthwhile taking a look at the location system script. It's long, but mainly due to the high amount of comments. It does basically what you want,so it may be enlighting ;)

 

I guess it's time I tried some scripting. :huh:

Put this in your signature, please. For me :rolleyes:

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I'm trying to set up a sequence in my map and keep running into issues:

 

How exactly does frob_peer work? I have a func_static and a moveable (both made of brushes). The moveable is frobable and the FS is not, but the FS is bound to the moveable and I want them both to highlight when the moveable is lit. I've tried putting the frob_peer spawnarg on both the moveable and the FS but nothing is working. No matter what I do, the FS never highlights.

Edited by Moonbo

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

@Sycamoyr

I had major problems at first, but were all solved by a reinstall of DR, like Goldwell said. I have my DMod and DR folders separated, if that makes any difference.

The important part is setting up your path after install for DR. It's confusing since you don't need it in the Doom folder anymore.

I did a reinstall of DR, but it did nothing to help the problem. I keep the darkmod folder directly in my "C" drive, with the DR folder inside the darkmod folder. The funny thing is, I copied the entire installation from the offending computer onto my laptop to see if it would do the same, but my laptop works worlds better. The only major difference between the two is the offending computer runs windows 7 and the laptop runs windows 8. My windows 7 computer has a better video card, so I really wonder what the problem is. I can run DR beautifully on my laptop, but my other computer is by far the better machine despite its hatred for DR. :( First world problems.

I think it bears mentioning that this was a progressive problem, it started out loading everything fine, but a month later it cannot even load certain maps at all; it's very slow when it does.

Edited for precision ;)

Edited by Sycamoyr
Link to comment
Share on other sites

Buck, put the spawnarg "s_global 1" on the speaker and it will make it play for the player like an ambient. "s_omni 1" will make it play from every direction, but I don't know if it's good dor this or not.

 

Edit: I thought the last post was on another page, so this post now looks like a non sequiter, but anyway here it is.

 

Incidentally, if you use a texture other than nodraw on the sides, you'll break the portal in a special way where no AI can walk through it. So watch out for that.

  • Like 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Well... Reading and reading and reading even more on this thread I have a feeling it lost it's "newbie" feeling, so here I am on the resque to turn it back to what it's supposed to be. More newbie than ever before! :P

 

Last couple of days I try to help with some models. I found a program to turn .obj's to .lwo's but I still can't undersand DR. To avoid have people who are busy with there own missions and stuff but are quite helpfull nevertheless I want to be able to test how the models look in the engine and not pass meshes around so people that know the how to can do it for me.

 

From the little I see DR is not simply "drop the model in engine and hit the play button" like I'm used to do with UDK or Unity. So what are the steps to do that in DR? Do I have to set up a room first and lights and so on? I tried my luck before using wiki as a guide but I didn't have any usable results.

 

I kinda feel ashamed for how "newbie" my question is but... If not here then where? :)

Sometimes I want to scream

So long that life escapes

And then I'd shut my eyes

I'd be the angel of disgrace

Link to comment
Share on other sites

I'm trying to set up a sequence in my map and keep running into issues:

 

How exactly does frob_peer work? I have a func_static and a moveable (both made of brushes). The moveable is frobable and the FS is not, but the FS is bound to the moveable and I want them both to highlight when the moveable is lit. I've tried putting the frob_peer spawnarg on both the moveable and the FS but nothing is working. No matter what I do, the FS never highlights.

You put the spawnarg on the frobable entity. It gets the name of the entity which should light up, too as argument. Also make sure that the texture used on the func_static is actually highlightable.

 

Example: You have your moveable and a func_static. The latter is called static for example. Now you just put the spawnarg "frob_peer" "static" on the moveable, that's it.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

 

From the little I see DR is not simply "drop the model in engine and hit the play button" like I'm used to do with UDK or Unity. So what are the steps to do that in DR? Do I have to set up a room first and lights and so on? I tried my luck before using wiki as a guide but I didn't have any usable results.

 

I kinda feel ashamed for how "newbie" my question is but... If not here then where? :)

 

You have to make sure that the name of your surface is the name of an existing material shader (or make your own). For basic testing you can use tdm_generic. Also make sure all polys are 3-sided.

Link to comment
Share on other sites

Is there a way to manipulate a ragdoll body in DR?

 

Don't think so...you have to load up your map, position the rag doll by dragging it, then use some special console command to save the position.

Link to comment
Share on other sites

saveRagdoll is the command iirc. However, as far as I remember I tried it once and did not get good results. If you want to place a dead body in a certain position, it may be more benefiting if you ask a modeler to create a one frame animation for you. Arcturus is one that comes into my mind.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Last couple of days I try to help with some models. I found a program to turn .obj's to .lwo's but I still can't undersand DR. To avoid have people who are busy with there own missions and stuff but are quite helpfull nevertheless I want to be able to test how the models look in the engine and not pass meshes around so people that know the how to can do it for me.

 

From the little I see DR is not simply "drop the model in engine and hit the play button" like I'm used to do with UDK or Unity. So what are the steps to do that in DR? Do I have to set up a room first and lights and so on? I tried my luck before using wiki as a guide but I didn't have any usable results.

 

I kinda feel ashamed for how "newbie" my question is but... If not here then where? :)

 

No problem, this is the right thread. It's not really a newbie thread like you noticed, it's become the general thread for any question that doesn't need a thread of its own.

 

To get your model into DR and the game:

 

Look in your main darkmod installation folder. The one that has TheDarkMod.exe in it, and it'll have one or two folders already including fms/

 

If there's a "models" folder in there already, drop your test model into that. If not, create one and put your model in it. Then restart DR and right-click on the grid view and choose "Create Model".

 

You should see your new model below the list of top level folders.

 

If you wanted your model to appear in a subfolder, just create the folder structure in your new models folder. So if you put it in models/atheran, then next time you Create Model, you'll see a new "atheran" top level folder.

 

That takes care of getting the model into DR. Now to see it in game, the minimum you need to do is create a room and add an ambient light and a shadowcasting light and a player start.

 

You might need to work through the first page (only!) of Fidcal's tutorial, but I'll attach a basic map with those 3 elements here.

 

https://www.amazon.c...-0JeyxDVW8gBDls

 

To get that working, download it and put it in a maps/ folder next to the models/ folder that you created. it's called "room.map"

 

You should be able to open it in DR, add your model to the room, then try it in game.

 

To launch it in game, start TDM, then open the console and issue 2 commands:

dmap room

map room

 

The first one compiles the map. The second launches it.

 

Good luck! Come back with any problems.

Link to comment
Share on other sites

Did anyone of you ever worked with gui overlays?

 

For my keyhole I use a gui overlay for the player. The gui contains two parameters, "gui::posX" and "gui::posY". As far as I've seen it in existing guis I should be able to change that values for example by calling setGuiFloat(handle, "posX",value) on the entity holding the gui, in this case the player. I have the handle and value is a float number. However, nothing happens. I can't change the gui parameters.

 

What am I doing wrong here?

 

Nevermind, it works. I've used too small values :D

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Could someone please tell me why this visportal doesn't work in game? Before I started working on the infamous king tomb toilet for noblesit was working however now it just doesn't register as a portal and I can't figure out why... I have attached the toilet and the relevant surrounding areas to the file below if someone wouldn't mind having a look and telling me where I went wrong I would really appreciate it.

 

Thank you!

 

tl;dr visportal doesn't work on the toilet, i've attached it here

 

toilet.txt

Link to comment
Share on other sites

Visportals must be surrounded by worldspawn brushes to work, mista.

post-11230-0-21730300-1409208327_thumb.png

  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Visportals must be surrounded by worldspawn brushes to work, mista.

 

I don't understand. What has changed in that picture?

 

I tried also creating just a box with worldspawn brushes but it didn't seem to work either.

Link to comment
Share on other sites

If I understand the situation correctly, none of the nodraw (purple-and-black) texture can be exposed and showing. It, along with all the edges of the visportal surface, must all be touching worldspawn.

 

Edit: Sorry that may be technically incorrect. I think it's just that the portal-texture surface edges must all be flush with worldspawn brushes (or inside them, but that risks other problems). It's just that in this case, making sure the nodrawn surfaces aren't exposed also fixes that problem. Anyway I personally don't like making even the nodraw surfaces exposed if I can help it though.

 

Edit2: And just in case this might also also an issue, the area behind the visportal must also be hermetically sealed from the area in front of the portal by worldspawn brushes. There can't be the smallest crack or func_stat between the two areas (called leafs) or it breaks the portal.

  • Like 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

I don't understand. What has changed in that picture?

 

If you filter out patches and entities in DR, you can see that the edges of the visportaled face are not touching worldspawn. That visportal doesn't seal, so it'll have no effect.

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

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • 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
×
×
  • Create New...