Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Your weird lines bug: hmmm, no idea. It seems to be moving independently of the light position, but it shows through by blotting out light from surfaces. It could be a renderer debug line... does it vanish if you set r_debugLineDepthTest to 1? (nb that cvar is sticky so you probably want to turn it off again).

 

I tried that command line but it didn't seem to do anything in game, the line persisted unfortunately.

 

I spoke with Bikerdude about this last night though and he was telling me this is a render bug and that he has seen it happen before as well. I found a way to alleviate the problem by moving the candle away from the wall, so for now its a solution :)

Link to comment
Share on other sites

Goldwell, does the lines go away if you change your antialiasing settings?

 

I once noticed that some of the settings caused bright sparklies. Disabling AA altogether fixed the issue, as did using a higher AA setting.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Hi again!

 

So I am making my first FM, which consists in some kind of tutorial and introduction to a small campaign. These are probably some very basic questions, but here they are :

 

- I would like to prevent the player from going back to previous parts of the level. Thus, I want to create some doors that can't be used by the player, but that will close by themselves behind him. Do you know how to do this?

 

- Just like in "Thief Gold" tutorial, I would like to teleport the player back to the entrance when he fails an objective. For instance, there is a room in which the player has to move to a door without alerting the nearby guard. As soon as the guard gets alerted, I want him to be teleported to the begining, and to reset the guard, so he can try again. Any ideas?

 

Thanks in advance!

Edited by Deshtat
  • Like 1
Link to comment
Share on other sites

Hey Deshat,

 

The first one is pretty simple. Set the "frobable" spawnarg on the door to "0". This will mean that the player cannot frob it any more (and thus can't open/close it). You can still trigger the door, which will open/close it. Theoretically the player could stick a moveable or something in the door's way to jam it open and if you really don't want that to happen you might have to put together some more workarounds, but otherwise that should do the trick.

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

 

I tried that command line but it didn't seem to do anything in game, the line persisted unfortunately.

 

I spoke with Bikerdude about this last night though and he was telling me this is a render bug and that he has seen it happen before as well. I found a way to alleviate the problem by moving the candle away from the wall, so for now its a solution :)

 

Is this something you see in every map, or just in this spot in this map? If the latter, any chance I could have a look at the map? Renderer artefacts are better than catnip as far as I'm concerned.

Link to comment
Share on other sites

Hi again!

 

So I am making my first FM, which consists in some kind of tutorial and introduction to a small campaign. These are probably some very basic questions, but here they are :

 

- I would like to prevent the player from going back to previous parts of the level. Thus, I want to create some doors that can't be used by the player, but that will close by themselves behind him. Do you know how to do this?

 

- Just like in "Thief Gold" tutorial, I would like to teleport the player back to the entrance when he fails an objective. For instance, there is a room in which the player has to move to a door without alerting the nearby guard. As soon as the guard gets alerted, I want him to be teleported to the begining, and to reset the guard, so he can try again. Any ideas?

 

Thanks in advance!

 

A good way to do the door trick would be to use Half-life type Point-Of-No-Returns. A pit the player jumps into, or some kind of other geometry the player goes in, but cannot get back up. Closing doors are a bit awkward, unless there is a reason for them to be closed and locked.

 

You have have AI "benny"

Make and objective "benny is alerted" the completion target fires a script that teleports the player. The script drops benny back to the relaxed state. The objective should be also recycled back.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Continued mapping today and I am now having a very strange issue.

 

All my light entities are now showing their XYZ volume parameters, although they are deselected. I checked the controls in case accidentally entered a particular command, but nothing is jumping out as the culprit.

 

EDIT:

 

Solved my question. Somehow, "show/hide all light volumes" had become checked...

Edited by Dunedain19
Link to comment
Share on other sites

Script documentation is patchy. The details are well documented, but not the bigger picture: the syntax and how to know what details you need. Come back and ask if you get stuck!

 

It seems you are right, I can't get it to work properly ^^

 

Actually, I created zones, with a "call_once_on_exit" script call. The script is supposed to close the doors behind the player.

Here it is :

void main() {

sys.waitFrame();

}

// this script is supposed to be called by the info_location. It closes the doors "room1door1" and "room1door2".
void thetutoR1Doors() {

$room1door1.activate($player1) ;
$room1door2.activate($player1) ;

}

The problem is that, when the player exits the zone, the game crashes, and I get this message :

 

1424002634-training-mission-2015-02-15-1

 

I don't really know if it means that the script is wrong or if it has to do with something else... any ideas?

Link to comment
Share on other sites

Actually, I created zones, with a "call_once_on_exit" script call.

The script itself looks fine. The problem is that the location system wants to pass a parameter to any script that you call on entering or exiting a location -- it passes the ID of the previous location in case your script wants to know. Your script has to accept that piece of info even if it doesn't plan on using it.

 

Fix it by changing this line to:

void thetutoR1Doors( entity old_zone ) {
Example at: http://wiki.thedarkmod.com/index.php?title=Location_Settings#Script_calls
  • Like 1
Link to comment
Share on other sites

 

 

1424002634-training-mission-2015-02-15-1

 

I don't really know if it means that the script is wrong or if it has to do with something else... any ideas?

It means that the number of parameters (you provided none) does not fit the number of parameters needed (one).

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

The script itself looks fine. The problem is that the location system wants to pass a parameter to any script that you call on entering or exiting a location -- it passes the ID of the previous location in case your script wants to know. Your script has to accept that piece of info even if it doesn't plan on using it.

 

Fix it by changing this line to:

void thetutoR1Doors( entity old_zone ) {
Example at: http://wiki.thedarkmod.com/index.php?title=Location_Settings#Script_calls

 

 

Yaaay! It works! Thanks a lot!

 

I'm gonna try something else now... I guess I'll be back later. x) Thanks again!

Link to comment
Share on other sites

Well, here I am again x) I'm having a strange issue with my objectives.

 

I want to create an objective that is completed when the player reaches the second room of the level. The two rooms have their own "info_location" entities. Thus, I want the objective to be completed when the "idPlayer" enters the room where "info_location_room2" is.

 

I tried to setup my objective like this :

 

1424014876-ppt1.jpg

 

The problem is that, when I save it, my objective "forgets" the last part, and instead of having "Name of single entity : info_location_room2", it turns back into "No specifier".

 

Did I do something wrong?

Link to comment
Share on other sites

Hmm. I'm not sure, I don't know much about objectives, so I ought to cancel this comment and wait for a mapper to respond instead :) This could be a bug in the latest DR, or it might be an odd setup that wants something different.

 

I think the traditional way to do what you are trying to do is with a trigger. Player enters trigger which targets a target_setObjective or target_setObjectiveComponent.. something like that.

Link to comment
Share on other sites

I've encountered that too, but I haven't got around to writing a bug report. However, I did find that the location-related spawnargs on the atdm:target_addobjectives entity do seem to exist after creation through the objectives editor, even though the objectives editor seems unable to read them.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

I'm sure greebo will fix this quick if it's indeed a DR bug, and if it gets reported in his thread. Rather than script adding the objectives, scripts can trigger objective completion too, so you could just add a line to your location-entry script:

 

http://wiki.thedarkmod.com/index.php?title=TDM_Script_Reference#scriptEvent_void_setObjectiveComp.28float_ObjNum.2C_float_CompNum.2C_float_state.29.3B

Link to comment
Share on other sites

Well, here I am again x) I'm having a strange issue with my objectives.

 

I want to create an objective that is completed when the player reaches the second room of the level. The two rooms have their own "info_location" entities. Thus, I want the objective to be completed when the "idPlayer" enters the room where "info_location_room2" is.

 

I tried to setup my objective like this :

 

1424014876-ppt1.jpg

 

The problem is that, when I save it, my objective "forgets" the last part, and instead of having "Name of single entity : info_location_room2", it turns back into "No specifier".

 

Did I do something wrong?

http://wiki.thedarkmod.com/index.php?title=A_-_Z_Beginner_Full_Guide_Page_6#Objectives:_Location_trigger

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've encountered that too, but I haven't got around to writing a bug report. However, I did find that the location-related spawnargs on the atdm:target_addobjectives entity do seem to exist after creation through the objectives editor, even though the objectives editor seems unable to read them.

 

That's right, it seems to only affect the editor, and not the actual entity.

 

 

I'm sure greebo will fix this quick if it's indeed a DR bug, and if it gets reported in his thread. Rather than script adding the objectives, scripts can trigger objective completion too, so you could just add a line to your location-entry script:

 

http://wiki.thedarkmod.com/index.php?title=TDM_Script_Reference#scriptEvent_void_setObjectiveComp.28float_ObjNum.2C_float_CompNum.2C_float_state.29.3B

 

This worked, thanks a lot! I will proceed this way from now on.

 

 

 

Thanks, I tried this process as well, but it didn't seem to work for me :/ I don't really understand why.

Link to comment
Share on other sites

For your "player is in a particular location" objective, try using the goal "is in location" and not "is in info_location".

 

The location brush should be an "info_tdm_objective_location", using the CLIP texture, and having the same name you define in the objective.

Link to comment
Share on other sites

For your "player is in a particular location" objective, try using the goal "is in location" and not "is in info_location".

 

The location brush should be an "info_tdm_objective_location", using the CLIP texture, and having the same name you define in the objective.

I'll try this next time ^^ Thanks. For now I'm just using a script.

 

Another question for you :3

 

I would like to teleport the player back to the "info_player_start_1" when he fails his objective. In order to do so, I created a script that is called when the objective fails:

void thetutoR1fail(entity other) { 

$guard_noise.setAlertLevel(0) ;
playerEnt.setOrigin( $info_player_start_1.getOrigin() );
$player1.setObjectiveState(3, OBJ_INCOMPLETE);
}

Unfortunately, I get this error when dmaping : Error: file maps\thetuto\thetuto.script, line 24: Unknown value "playerEnt"

 

I got this command from the wiki, but I guess it is out of date. Do you know what I sould do?

 

Thanks again!

Link to comment
Share on other sites

Well apparently none of my lines work, which is strange xD Even a single console print won't work. I think there must be something weird going on with the script call or the objective itself... I'm gonna check this, thanks x)

 

EDIT : Could it be the fact the script refers to "other"?

void thetutoR1fail(entity other) { ... }

EDIT 2 :

 

Fixed! It was this line indeed. I had to write it this way :

void thetutoR1fail() { ... }
Edited by Deshtat
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

    • 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
       
      · 3 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
    • 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
×
×
  • Create New...