Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

How to set up a door as locked and unpickable and then unlock it by way of a trigger?

 

Is there a way to make a neutral ai become agressive by standing inside a trigger multiple for too long and/ or by stepping inside a trigger once?

Link to comment
Share on other sites

I think trigger entities can only detect when they are clipped. They can't tell if the AI remains or leaves. I would use two invisible optional location objectives targetting a trigger timer then to change the AI's team from neutral plus an alert sound if you want him to become immediately alerted. Need some thought how to stop and restart the timer. If nobody comes up with a better solution I can give your more details.

Link to comment
Share on other sites

How to set up a door as locked and unpickable and then unlock it by way of a trigger?

 

Give the door spawnargs locked 1 and pickable 0. We have an entity called target_changelockstate (or something like that). Give the door as a target for this (target_changelockstate) entity. Now when you trigger the target_changelockstate entity, your door sill unlock. Check the available parameters for the target_changelockstate. I think there was options for to have it as a toggle, lock only or unlock only. I've only used the toggle spawnarg, which cycles the door lock state.

 

 

Is there a way to make a neutral ai become agressive by standing inside a trigger multiple for too long and/ or by stepping inside a trigger once?

 

You have to change the team parameter with S&R system. (select any func_static, choose S&R, give it response trigger and select the effect change team for AI.)

As for when to trigger the entity, you could use simply a trigger_once to make the AI instantly into a different team when the player touches the trigger.

Or you could use trigger_multiple that target a trigger_count. As long as the player stands in the trigger_multiple, the trigger_count is increased. Once the trigger_count goes too high, it triggers the entity that changes the AI team. You could change the trigger_multi wait/delay time (the time it takes to reactivate after triggering, don't remember now which it was) and the trigger_count amount to adjust the time. Heck, you could even have another trigger_counter running at the same time but smaller amount of counts and have that trigger a conversation to make the AI to say "back off buddy or there is gonna be trouble."

 

As Fids said, resetting the counter will be tricky. I hope your setup does not need that. The player could then stand in the forbidden area for a fixed amount of time and if he ever returns there, the AI gets pissed.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Thanks guys, thats exactly what I needed. Sorry if I wasnt so clear, but I indeed meant alerting AI with the player spending too long inside a trigger multiple brush, there are a couple of neighbours chatting outside their houses, which are locked, I wanted to add this so they will turn against the player if he decides to pick the locks ( and thus, spending a few seconds in front of their doors in order to do it - crossing along wont alert them, but suspiciously staring at their doors will; they'll definetly turn agressive even if the player picks the key off of their belts, and enters quicky, as there'll be a trigger once just for that behind the door (the men will be pretty close so there's no way they'll not see the player getting into their homes).

 

Thanks for the detailed walkthrough Sotha, that secondary trigger that regulates the AI warnings is very nice, hopefully I'll manage to include it... Two obscure features down, now to implement them in game! ;)

Edited by RPGista
Link to comment
Share on other sites

Indeed, but it meant scripting and i just want a simplified version of that, so i remembered about the triggered detection Sotha sugggested.

 

Will try to implement right now before I loose track of it again.

Edited by RPGista
Link to comment
Share on other sites

Update: Door done! Success my friends, I got the peasants to attack the player, I used the setrelations entity instead, its simpler and blunter (it turns everyone in a certain team against you, not just specific ones), because in my case, it wont matter, as the only neutral AI guys are together in a group and should be alerted all at once anyway! :) Its pretty abrupt and what they say might be contradictory most times (as there's no controlling of speech and no gradual increase of alert level), but it works!

Edited by RPGista
Link to comment
Share on other sites

Nice to hear it worked out for you. Sometimes the solution is just finding out things by testing around. Well.. in my case that happened often, haha! :laugh:

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Pathing can be upset by teleporting. It was the same in Thief. First thing to check is if pathing is created in that area. For instance, an isolated area without AI would have no pathing created so teleporting in an AI he wouldn't be able to move. So check that first and if needed there is a path flood entity to force pathing I forget the exact name of it and how it works. A quick test is just put another human AI neutral in there to force pathfinding.

 

If it still doesn't work then try starting the AI in the final area then set up a trigger to teleport him away at map start. (I can give you info on that if you don't know how but a quick test would be to do it from a lever.) He can then be teleported back.

 

[edit- you know of course to either dmap or runAAS map before any path changes will be effective]

 

Can you please elaborate more on that last part? I got this to work on a test map, imported the whole thing to my main map, and now the ai wont move again after teleporting. He can move normally when he spots me, and there are plenty of ai around, so its not the lack of pathfinding... Ive tried creating all the entities involved from scratch and still nothing, the ai would indeed have to cross 3 visportals between the point of teleport and the first path corner, could that be the problem?

 

Link to comment
Share on other sites

[EDIT] Did you definitely run dmap or pathfinding again after importing?

 

Does he patrol if you don't teleport him away at the start? Or indeed if you only teleport him a few inches away instead of to a blue room?

 

Does he definitely target the first path corner?

 

Try adding another path corner near to where he starts.

 

[EDIT] Try putting in a delay of several seconds at the start before he teleports (up to 10, 15 or 20 seconds for a big map.)

Link to comment
Share on other sites

What is the proper, official, way to make the "alerted AI rouses a sleeping/sitting friend" behavior?

 

I have AIs sleeping or sitting and doing something else. I want them to sit or sleep the whole time unless they see the player or an AI who has seen the player (walking sword out) rouses them. Then they would get up and start patrolling.

 

I have a sleeping AI and sitting AIs playing cards, who target a alert_only path_corner which sends them to patrol network. However, when an alerted AI passes them, he does not inform them of troubles.

They only get into their alert paths if they themselves see the player, alerted friends make no difference.

 

EDIT: Got AI to alert sitting friends of the same team. An alert AI of same team does not seem to get a sleeping AI to get up, though.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

For me it worked out. They informed their teammates no matter if sitting or not. (not tested for sleeping)

Hm, you may want to try to use a path_sitting (don't forget the path to set to idle_only!) instead of 'sitting 1' on the ai.

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

An alert AI of same team does not seem to get a sleeping AI to get up, though.

 

For an alert to be passed, the alerted AI needs to talk to the sleeping AI.

 

However, we don't allow this; the AI is sleeping, so leave him alone. (See #2464.)

 

We would have to make an exception if it's an alert message being passed, and let the sleeping AI hear it and wake up.

 

Pls file a bugtracker issue for this.

Link to comment
Share on other sites

@ Fidcal - I was (finally) able to make the teleported AI work again, by remodelling several elements on his path (monsterclipping and visportaling for ease of pathfinding) and/or by adding a connection between the trigger and the AI through the trigger relay, though I'm sure this wasnt needed on the test map (in fact, for all I know it might not even matter, and it was the pathing problem all along), so the sequence would be:

 

Trigger > trigger_relay > atdm_teleport > (AI)

(Trigger > trigger_relay) > AI > path_waitfortrigger > path_corner

Edited by RPGista
Link to comment
Share on other sites

Ah I see I think. Because he could not path immediately in the big map (because it took longer to set up at game start) then he gave up patrolling completely. In the original test map it probably started quickly enough before he gave up.

Link to comment
Share on other sites

Would it be possible to set up a flee point per team? I dont think just the distance check would be enough to make them choose the right one... And will unarmed AI automaticly flee to them after seeing the player? Could an armed AI be set to "low morale", fleeing almost everytime but also capable of fighting if trapped? Could I make the AI flee to a point inside the house, and if the player follows him there, he would then flee to the second (distant) flee point outside it?

Edited by RPGista
Link to comment
Share on other sites

I've seen shields mentioned a couple of times now in the wiki pages, also seen the model in DR but never saw any AI ever using an attached one in any mission, I was wondering if they are supported in any way (meaning, animations and code to use shields and protect themselves), or are they basicly meant as decoration?

Link to comment
Share on other sites

you could probably def attach one and it's physics would still work (did this in T2, though sometimes in T2 the shield would actually kill the ai, lol).

 

They just wouldn't use it to block or hold it out with in a proper fashion, but it would make them harder to hit.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Would be nice to have eventually AI branding shields, ala centurions or roman soldiers - they could present the major obstacle that is the shield, but wouldnt block with the sword, so you basicly would hace to sidestep and slash laterally or wait for them to open up and counter. Anyways, sounds like a bit of work...

 

Edit - would it be too hard, as a compromise, to make them work as a supported def attach ( like torches), and simply have the ai keep their left arm fixed with the shield hanging at the chest level, at a 10 or 11 hours angle? If the physics of the shield would work, it would already present a new challenge?

Edited by RPGista
Link to comment
Share on other sites

I'm trying to learn about textures/normalmapping, and to help, I've built a dead basic room (i.e. page 1 of Fidcal's A-Z) and put a torch on each wall so I can prepare the texture files and slap them on the walls; the idea being that I maybe start getting at least some idea of how my random tapping on values in the nvidia normalmap plug-in affects the output in-game. (I'm putting up any textures, not necessarily wall textures.)

 

However, I seem to have problem with two of my walls, which is that no matter what texture I put on them, they show up as blown-up, blurry, low-resolution versions of that texture. The other two walls look fine. Hopefully this pic will give some idea of what I'm talking about: -

post-9265-0-03561400-1332546205_thumb.jpg

This has the same texture on both walls, but the LH wall always comes out up blurry and blown-up no matter what texture I place on it. The two out-of-shot walls have the same issue - one looks fine, the other looks rubbish. Any ideas what I've messed up?

Link to comment
Share on other sites

Its probably the scale of the texture applied to the brush (that could be too big). If you select the brush, and then press S, a window will appear in which you can move, rotate and scale the texture on the faces or brush selected. First thing to try is to press on the "Natural" option on the botton (Texture Operations), this will reset the texture to its default values.

 

EDIT: Sorry, replied at the same time as Grayman...

Edited by RPGista
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.
      · 4 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...