Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

I don't really know how to do this.

 

 

Give one of his opponents a ridiculous amount of HP?

 

I suspect the problem to be the "idle_only" spawnargs on a path node.

 

 

Have you established that he can reach that node under normal circumstances?

Link to comment
Share on other sites

Yes, I have. The patrol works fine normally. The problem also doens't occur directly at the node in question. According to our beta testers he circles somewhere else and only after an alert. I have never seen it at all.

Link to comment
Share on other sites

@deshat, if you really wanted to continually respawn enemies upon death (which could be risky) you could create a custom enemy AI (just inherit it from the standard AI) with a default deathscript which will spawn a replacement. You could also tweak them so that they wouldn't ever run away if too damaged, have more hitting power, etc. That way whenever that AI dies, it would trigger the deathscript and spawn in a replacement. Of course that means if the player killed the AI then the same thing would happen.

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

Of course that means if the player killed the AI then the same thing would happen.

You can check for player responsibility this way:

 

void on_AI_Death(entity e)
{
     ai aiMe = e;
     if ( aiMe.isPlayerResponsibleForDeath() )
     {
          // If the player is responsible for my death, do nothing
          return;
     }

     // spawn replacement AI

     blah, blah, blah
}
Link to comment
Share on other sites

A script can get the A's health from the spawnarg--check the 'show hidden properties'on that AI in DR--and keep triggering the Ai spawns as long as it's over zero. But I'd probably set their health to a huge number, let them fight, and at a certain point just script charA's death as if killed.

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 wiki says

  • frob_peer_<N> Determines what other ents shoud hilight when this ent is hilighted. For each ent you want to hilight, put in a key of the form "frob_peer_<N>" with value: "<entity name>". If you just want one frob peer, putting in "frob_peer" is also fine, but multiple frob peers must have the form "frob_peer_*". NOTE: Currently this only works to propagate the hilight. The frob action when you hit "use" is not propagated to all entities within a frob peer group. This is handled by setting "frob_master" described below.
  • frob_master Set to the name of an entity. This is used to propagate the frob action to other entities when one frobbed entity is used. It sets up a chain, and frobbing any link in the chain will call the frobaction on the whole chain.

http://wiki.thedarkmod.com/index.php?title=Frobbing

 

I fail miserably to understand what these do.

 

I have a grate door. I have put a model lock on it. I've given the lock "bind grate."

How do I set so that the lock AND the grate frob-highlight in unison? Also, when the player picks the lock, it should not matter whether they pick the lock, or the grate. In other words, the grate door lock is picked if the player is aiming at the lock OR the grate door.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

How do I set so that the lock AND the grate frob-highlight in unison?

Insert any chest prefab you like and look at the set-up between the lid and the body there. It's exactly the same for this. To outline it, though:

 

  1. Make your door/gate as usual, but don't put any lock-related args on it
  2. Make your lock and turn it into an atdm:froblock
  3. Give the locked, pickable, lock_picktype, lock_pins and used_by args to the froblock entity and make it target the door/gate
  4. Give the froblock a "frob_peer" arg that names your door/gate and give the door/gate a "frob_master" arg that names the lock

 

Now they should both highlight when you look at one, and you should be able to pick the door whether you look at it or the lock

Link to comment
Share on other sites

another point which is not in that article is that the second object must be set to frobable 1 if its a fs (you can set its frob distance to 1 however to ensure it never highlights on its own).

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

If you only want other objects to highlight in unision you use frob_peer.

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

Is it possible to have lights that do a transitional fade on and fade off instead of the normal either on or off?

Link to comment
Share on other sites

You can do this by scripting.

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

Yep, use:

X.LightFadeIn();

X.LightFadeOut();

 

http://wiki.thedarkmod.com/index.php?title=TDM_Script_Reference#idTarget_LightFadeIn

 

Hmm, seems that wikipage borked the syntax, since I'm sure you put the duration in ms in the parentheses somewhere. I had another wiki page with it, but it seems it was forwarded to that page. =L Well, other scripts use it anyway; just use their syntax. The location_settings.script, which you can find in the main download will have it somewhere.

  • 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

Actually, before you asked, I have not. I thought maybe someone just knows. After trying, I have found out, that the handle is just bound to the door, but is not the "source" for lockpicking. You have to set the pins and lockpick type on the door. The handle is just decorative. So, sadly it does not work. I also have thought of making the door unfrobable, but this also turns the handle unfrobable :( Well, then I will just take another alternative and block the door with movable crates from one side. Should also work for a "one way" door.

Link to comment
Share on other sites

Yep, use:

X.LightFadeIn();

X.LightFadeOut();

 

http://wiki.thedarkmod.com/index.php?title=TDM_Script_Reference#idTarget_LightFadeIn

 

Hmm, seems that wikipage borked the syntax, since I'm sure you put the duration in ms in the parentheses somewhere. I had another wiki page with it, but it seems it was forwarded to that page. =L Well, other scripts use it anyway; just use their syntax. The location_settings.script, which you can find in the main download will have it somewhere.

 

Ok I got that working however how would I set it up so that it detects if the light is on and fades off and if it is off it fades in?

 

The code I have so far that does work in game is

void fadelightbasement()
{
	sys.println("fading light");
	$globelight1.fadeOutLight(0.5);
}
Link to comment
Share on other sites

Hi all,

Just upgraded to TDM 2.03, and now the texture "blocks_sepia_grey" no longer displays correctly in my WIP (it just appears black in-game). When trying to dmap, I get "WARNING: Couldn't load image: textures/darkmod/stone/brick/blocks_sepia_grey_d". Any ideas on what I can do to fix this?

Link to comment
Share on other sites

It's http://bugs.thedarkmod.com/view.php?id=4110

 

(Possibly related: #1, #2. My experience with those was that loading the file in a suitable image editor and saving it to a TDM directory path could produce a working version. I haven't tested that with blocks_sepia_grey_d.)

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

 

 

Ok I got that working however how would I set it up so that it detects if the light is on and fades off and if it is off it fades in?

 

There may be different ways to do this, but one method I like (if I'm understanding the problem right) is using a dummy property in an object, since you can setKey & getKey the properties by script. Then the info persists between script triggerings. Have a property for each light with its starting status, then the script handling the on/off or fadein/fadeout behavior first gets that dummy property so it knows what to do, then at the end it changes the dummy property to the new state. If you do it right, it should be failsafe, so the property always aligns with the actual state.

 

Edit: It may be that lights already have an on/off property in them actually. Check the box for show hidden properties to see. Then that property does the job for you automatically!

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

void fadelightbasement()
{	
	if ($globelight1.getKey("ison") == "no")
	{
		sys.println("light is off, fading in");
		$globelight1.fadeInLight(0.5);	
		$globelight1.setKey("ison", "yes");
	}

	else if ($globelight1.getKey("ison") == "yes")
	{
		sys.println("light is on, fading out");
		$globelight1.fadeOutLight(0.5);
		$globelight1.setKey("ison", "no");
	}
}

Ok so I gave the light a spawnarg "ison" and setup the following script and it works! Thank you :)

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...