Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

I´v fiddelt around with the setup you postede and it kind of works but is easy to break huh.gif

 

I think this kind of elevator setup needs a script to work with out breaking!

Is there a way a script can cheak what floor the elevator is on?

Is there a way a script can cheak the staet of a door (0=closede, 1=open)?

 

And is there a tut any where for; dum newbies with out any codeing experience introduction to scripting wacko.gif

Link to comment
Share on other sites

I think this kind of elevator setup needs a script to work with out breaking!

Is there a way a script can cheak what floor the elevator is on?

Is there a way a script can cheak the staet of a door (0=closede, 1=open)?

 

The general way you get scripts to check for things like this is, when they are done you add a script command that "setKey"s a spawnarg on some game-object (usually that same object), like: $object_name.setkey( "door-state", 1 );

 

Remember that buttons can call scripts, so that's how you get an elevator script running to do it, and also doors are also sub-types of buttons so I believe you can call a script from frobbing a door too. So that's how you get a script running to do the setKey.

 

Then when you want to check the state, the other script getkey's the same spawnarg, like: Door_state == $object_name.getKey( "door-state" );

 

Check these in the wiki because I'm doing it by memory.

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

the problem with doing in by S&R is (as fare as I can see) that it can be brok too easy! the S&R map I hav is not even 50% working so I´l drop that as it would be alot better doing it by script!

now if I only somehow can get my head around this script thing wacko.gif

 

And again I ask is there a tut anywhere for; dum newbies with out any codeing experience introduction to scripting wacko.gif

 

I´v read the tut in the wiki by Fidcal but as with a lot of other tut´s for scripting it makes the assumption that I hav at least a basik knowledge and I don´t sad.gif

Edited by Nielsen74
Link to comment
Share on other sites

I really don't think you will find anything easier to get started than my scripting tutorial. That is why I started writing it (it's not complete) - because I searched everywhere and found nothing easy for beginners. But it is a time-consuming subject and would take quite some time to learn even with previous programming experience.

 

I can appreciate the complexity of what you are trying to achieve makes you want to throw away what is done so far in disgust (I've been there so many times myself ;)) but that would be a waste. I recommend you hand it over to me and let me finish it and get it working using.

Link to comment
Share on other sites

@Fidcal

humm you maby right fid! but scripting will come in handy for me for other maps as well that I´l try to make in the futur and this migth be the right thing to keep me motivatede to learn scripting!

 

@rich_is_bored

I´l hav a look! thanks!

Edited by Nielsen74
Link to comment
Share on other sites

I've done one but it might be easier if I do a prefab and upload it rather than explaining it. We have not managed to come up with one that is a true pressure plate, ie, responds to weight so this one is triggered by the player stepping on and off. But it won't work if you say, put a barrel on it. It could be easily modified though I think. I think Springheel might have done one as well using a different method. I'd forgotten all about this.

 

Give me an hour or tomorrow though because I gotta eat and stuff.

Link to comment
Share on other sites

No wait, I can do this quick. Attached is a test map. Save it and rename the suffix to .map. It works by using invisible control objectives. The plate in the floor works for the player standing on/off it.

 

There is also a vase on a plate which you are supposed to substitute something Indian Jones style but I couldn't get it to work properly so ignore that.

 

pressure_plate.TXT

Link to comment
Share on other sites

It´s sort of what I want!!! but one that both react to the player AND things from the surroundings like a barrel,

as the scenario is that the player finds the pressure plate by stepping on it and a secret door opens but when the player gos for the door it closes as he steps of it, near by is some barrels and other stuff (or even just a boulder/big brick) that the player can put on the plate to keep the door open!

Link to comment
Share on other sites

I'm running into some weird texture warping on patches that I haven't seen before. I'm doing some bevels, and when I copy/paste the shader from the flat surface to the patch, the texture is matched up at the edges, but it's distorted on the patch -- for example, lines on bricks or wood will be slanted instead of following the same direction as on the original brush. Help?

Link to comment
Share on other sites

@stumpy

yes I could if it´s only a 2 storey elevator, but 3 or more then the problem is that if the player travels from 1 th to say 4 th the 2 and 3 floor would be triggert (doors open to the empty elevator shaft) and now the player is going from 4 th to 3 th and the doors would trigger shut at arrival! mellow.gif that´s what I would call broken wink.gif

Edited by Nielsen74
Link to comment
Share on other sites

It´s sort of what I want!!! but one that both react to the player AND things from the surroundings like a barrel,

as the scenario is that the player finds the pressure plate by stepping on it and a secret door opens but when the player gos for the door it closes as he steps of it, near by is some barrels and other stuff (or even just a boulder/big brick) that the player can put on the plate to keep the door open!

 

You should be able to make it work with barrels by adding another component to each of the objectives - probably any entity of a class - then add 1 OR 2 to the success logic.

Link to comment
Share on other sites

I'm running into some weird texture warping on patches that I haven't seen before. I'm doing some bevels, and when I copy/paste the shader from the flat surface to the patch, the texture is matched up at the edges, but it's distorted on the patch -- for example, lines on bricks or wood will be slanted instead of following the same direction as on the original brush. Help?

 

Try three things: copy shader, copy shader natural, or just hit natural on Surface Inspector. Hopefully one of those will make it work.

Link to comment
Share on other sites

You would need to cut up a brush into a lot of small brushes using the clipper tool (press X on the keyboard) to make an arch shape.

 

I'd recommend you use patches instead. The wiki entry http://wiki.thedarkmod.com/index.php?title=Patches gives an introduction to patches and at the bottom are instructions on how to create an arch.

 

 

Link to comment
Share on other sites

Best not to use brushes for curves if you can help it. If I were using brushes then I might use big stone angled blocks and literally arrange them as you would a real stone arch. Maybe one central at the top and 3 or 4 either side.

 

In patches refer to http://wiki.thedarkmod.com/index.php?title=Patches#Archways

Link to comment
Share on other sites

As I understand:

 

Player-clip - Stops player but allows AI

Monster-clip - Stops AI but allows player

Clip - Stops both

 

It sais both monster_clip and player_clip in the shader definition for clip.

 

I've building a wall where the player shall be unable to mantle and the areas beyond is decoration. I guess this should be filled with monster_clip, but as the player also should be unable to get there, may I use a clip-brush to do both in one?

 

And also:

How high needs the monster_clipping be? Is it enough with a tower that the AI is unable to reach or do I need to take it to the ceiling?

Edited by Fieldmedic
Link to comment
Share on other sites

Just has to be high enough they can't 'walk over it' I think around 48 units is good but I usually just go 96 or so (about character high)

 

I did find that monster clip adds to map,cm,proc file sizes. I tried to put it everywhere in my contest map thinking that fewer places for monsters to go might help shrink the overall size a little, but I guess it's just more for the map files to store. So going to ceilings makes map size bigger.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

On the other hand, because monsters can still walk on the top surface of a clip brush, dmap is still going to compute pathfinding for it, whereas I don't think it would if it went into the ceiling. But I've never tested it out to see if it makes any difference to the dmap time, load time, or size or whatever.

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

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • 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
×
×
  • Create New...