Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

With my simpleton brain hurting so. Help will be appreciated :wacko:

 

Obsttorte suggested a script:

 

void checkForScepter()

{

if ($player1.heldEntity() == $scepter)

{

sys.trigger($teleporter);

}

}

 

You could try adding

print("some message")

and see, in the console, if the function is even called correctly

 

void checkForScepter(){
 print("checkForScepter running");
 if ($player1.heldEntity() == $scepter){
print("player is holding scepter");
sys.trigger($teleporter);
 }
}

Link to comment
Share on other sites

I receive an error message from line 2:post-20393-0-97924100-1375105358_thumb.jpg

Laptop:Metabox P370SM3- Intel Core i7-4800MQ- 2x GTX780M SLI- 16G 1600Mhz- 500G Samsung mSata-1TB Hitachi HDD- 120Hz LG 1080p.Desktops:i75930k-2x GTX980 SLI-16G 2133Mhz-Evo120GSSD-Swift PG278Q1440p Gsync.Spare:AMD A10-7850K-APU-8G 1866Mhz-seagate 4TB-120G ssd. LoL Old:P75-1:1FSB-8M ram 512MB Maxtor HDD-1MB Cirrus Logic video chip-still got the parts somewhere?First PC-Tandy 512K Color computer.

Link to comment
Share on other sites

@tr00pertj: How did you set it up?

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

How do you increase the range an AI will see the player and then attack them? my AI is an archer btw

Link to comment
Share on other sites

The simplest thing to do is to increase his visual acuity, "acuity_vis". This will improve his low-light acuity, but might not provide much improvement over the default acuity when the player is well-lit.

 

There are distance limits built into the code, and they can't be changed for one AI. How far away did you want him to spot the player? And will the player be well lit, or not, and what is the "_color" setting of your ambient_world?

Link to comment
Share on other sites

You can increase the lightgem value with "lightgem_offset" or so set on worldspawn. This will cause the lightgem to be more lit and therefore cause the ai to spot the player more easely.

 

Are you actually just aiming for the ai to spot the player a bit more easely, or is this something you need in a specific situation that only applies to one ai?

 

Making the ai spot the player a bit worse one far distances was included in 1.08 IIRC, as it was quite a bit unrealistic and annoying before. You should have a good reason if you want to change that dramatically.

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

You can increase the lightgem value with "lightgem_offset" or so set on worldspawn. This will cause the lightgem to be more lit and therefore cause the ai to spot the player more easely.

 

That will work, but it will affect all AI, not just one. It depends on what effect you're trying to create.

Link to comment
Share on other sites

I would suggest having the sceptre act as a key so that you need to use it to "unlock" the teleportation effect. Either that or you could use stim response and have the player rub the sceptre against some object to trigger the teleport

 

You can use the "wait" spawnarg on a trigger relay to delay the teleport while the sound plays. Let me know if that makes sense :-).

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

The delay can also be put into the script.

 

I'm a bit curious that the script don't seem to work for you. I guess you've set up something wrong in DR, as you don't have to know anything about scripting to use it.

 

You can also pm me if you don't get this to work.

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

Basically it's a courtyard with archers and because they have a better vantage point I want them to see further. But I guess for now I will just leave it as it is and worry about tweaking that later.

Link to comment
Share on other sites

Sorry to ask the same question twice, but was there anyone who could shed some light on the missing water properties?

 

Brush selected+create entity>atdm:liquid_water = no water physics.

 

Surface textures working just fine and looks lovely, but when you stick your head under, the illusion breaks.

Link to comment
Share on other sites

Is there a simple script I could put in before the if ($player1.heldEntity() == $scepter) entry that would first check to see if objectives 1 AND 6 AND (2 OR 3 OR 4) are complete.

 

I thought of attaching the trigger_entityname_1 to a mover that would be an objective and only slide down into position if objectives 1 AND 6 AND (2 OR 3 OR 4) are complete.

 

But also thought a script would do the job better as the trigger_entityname_1 would still be in the map just out of the way. How can I turn the trigger_entityname_1 ( it`s a trigger_touch) off and on? At the moment it starts on but if I turn it off the teleport doesn't happen.

Laptop:Metabox P370SM3- Intel Core i7-4800MQ- 2x GTX780M SLI- 16G 1600Mhz- 500G Samsung mSata-1TB Hitachi HDD- 120Hz LG 1080p.Desktops:i75930k-2x GTX980 SLI-16G 2133Mhz-Evo120GSSD-Swift PG278Q1440p Gsync.Spare:AMD A10-7850K-APU-8G 1866Mhz-seagate 4TB-120G ssd. LoL Old:P75-1:1FSB-8M ram 512MB Maxtor HDD-1MB Cirrus Logic video chip-still got the parts somewhere?First PC-Tandy 512K Color computer.

Link to comment
Share on other sites

Kvorning:

 

1. Is the water entity origin within the water brush(es)? For instance, you might have made a square donut shape of sewer tunnels consisting of 4 brushes then made it a water entity but the origin by default will be in the centre of the donut hole not within water.

 

2. Create a simple brush elsewhere in the map within a big clear area not overlapping any other brushes, patches, visportals, etc. and convert it to water and dmap. Does it work? If so, find out what is different between that situation and the situation where your other one doesn't. If nothing obvious then backup your map and start with a new copy. Reduce your troublesome water to a minimum so it's just one brush. Dmap. Does it work? Keep testing parts of it like that until you isolate what works and what doesn't. Ultimately you should discover the problem and can then fix it. You may be able to go to earlier backup and make one simple change or you might have to rebuild the water.

Link to comment
Share on other sites

Yeah I'm afraid the entity is inside the brush, it's a simple cube shape for each volume. Weird thing is, I've made a testmap that's just 1 room, player start and world light. Made a water volume in the buttom, that does not intersect with anything what so ever.

 

At first it didn't work, but after changing the volume about 6-7 times and dmapping, it became a swimmable liquid with fog. Then it just stopped after another dmap. Tried another 10 times, and it worked, and then stopped.

 

Something fishy is going on.

 

By the way my map is done, just wanted to say ;) This is one of a few bugs I want fixed before releasing it.

Link to comment
Share on other sites

it's a simple cube shape for each volume. ... after changing the volume about 6-7 times

 

It's not at all clear what you are doing here. It sounds like the water entity is not one simple block. Try a single, simple brush not several and get that working as water first.

 

What I'm saying is, you may need to make several different water entities, not just one that covers several brushes. It depends on the layout.

 

If you create a single brush water entity and dmap and it's deep enough to wade or swim in and its properties fail then it sounds like a serious bug. But I'm not convinced that's what you are doing.

Link to comment
Share on other sites

When odd things happen with dmap, I recommend deleting the .cm and . Proc files in the map folder. Sometimes dmap doesn't overwrite them properly.

Link to comment
Share on other sites

Is there a simple script I could put in before the if ($player1.heldEntity() == $scepter) entry that would first check to see if objectives 1 AND 6 AND (2 OR 3 OR 4) are complete.

 

if ( $player1.getObjectiveState( <your objective number here> ) == 1 )
{
 // the objective has been met
}
else
{
 // the objective hasn't been met
}

Link to comment
Share on other sites

@Fidcal

 

Well the last thing is exactly much what I'm doing.

 

I found the problem though, as per the guide (http://wiki.thedarkm...php?title=Water) I was using, I had a volume with nodraw on the sides to prevent z-fighting. So I tried changing all sides to caulk and only putting nodraw on the sides that connect to another volume.

 

Now it works!

 

Edit: All sides except for obviously the surface ;)

Edited by Kvorning
Link to comment
Share on other sites

Something fishy is going on.

 

Sure is.

 

Here's another way of approaching the problem: copy a working body of water from another map and see how it behaves in your map. Adjust the sides to make it the size you need.

 

This is a test map I'm using to debug water splash sound propagation. It's worked every time.

 

bug3413.map.txt

Link to comment
Share on other sites

if ( $player1.getObjectiveState( <your objective number here> ) == 1 )
{
 // the objective has been met
}
else
{
 // the objective hasn't been met
}

 

To specifically fit your situation ...

 

if ( ( $player1.getObjectiveState(1) == 1 ) && ( $player1.getObjectiveState(6) == 1 ) &&
( ( $player1.getObjectiveState(2) == 1 ) || ( $player1.getObjectiveState(3) == 1 ) || ( $player1.getObjectiveState(4) == 1 ) ) )
{
 // the objectives have been met
}
else
{
 // the objectives haven't been met
}

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