Jump to content


Photo

Newbie DarkRadiant Questions


8042 replies to this topic

#8026 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 468 posts

Posted 07 February 2018 - 04:56 AM

2. How to trigger the player say something after closing a readable. I know how to make him say something after picking something up with a trigger once -> atdm:voice thingy, but when I target the readable instead of the item nothing happens. I know that you can make an objective trigger after closing (or only when opening?) a readable, so I feel like it must be possible on voice as well?

 

You'd need to make a hidden irreversible objective to close the readable. You need to enter the name of the atdm:voice... entity into the "Completion Target" box so that when the objective completes, it triggers the completion target.



#8027 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 85 posts

Posted 07 February 2018 - 06:15 AM

 

You'd need to make a hidden irreversible objective to close the readable. You need to enter the name of the atdm:voice... entity into the "Completion Target" box so that when the objective completes, it triggers the completion target.

 

It really is not possible to do it without using an objective? Maybe I wasn't clear, the idea behind this spoken line is just like a Garret quip basically, and is not connected to any objectives (in fact 95% of players probably won't see it at all). Even if it's a hidden objective, it's not going to cause trouble having many, complicated objectives? I'm going to have other questions about objectives later since I'm having some big problems with that as well.



#8028 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 468 posts

Posted 07 February 2018 - 06:30 AM

It might be there's a spawnarg around for triggering something when closing a book, which would be more elegant, but neither the readables wiki page nor a google search of readable + trigger suggested that this exists.

 

All the objectives editor really is is an interactive scripting editor, so I reckon someone knowledgeable could find a way to get the same thing done with a script. The objectives editor is the much easier route, and I haven't faced any difficulties with having more than a handful invisible objectives. IIRC each of my maps has 15-20 of them in addition to the visible objectives.



#8029 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 85 posts

Posted 07 February 2018 - 05:02 PM

It might be there's a spawnarg around for triggering something when closing a book, which would be more elegant, but neither the readables wiki page nor a google search of readable + trigger suggested that this exists.

 

All the objectives editor really is is an interactive scripting editor, so I reckon someone knowledgeable could find a way to get the same thing done with a script. The objectives editor is the much easier route, and I haven't faced any difficulties with having more than a handful invisible objectives. IIRC each of my maps has 15-20 of them in addition to the visible objectives.

 

Well I tried your idea out and it seems to work like a charm. Much more painless than I thought! Since I'll only have one or two instances of this in my map I'm sure it'll be ok. Thanks for the tip!

 

 

...

 

1. How to make an AI "hold a pose", specifically I want an AI to be in a kneeling position until I trigger him to move to another path node. The closest I've gotten so far is to have him repeat the animation over and over like he's doing lunges on leg day, not quite the effect I was going for.

 

...

 

Does anyone have a solution for this one?


Edited by Bienie, 07 February 2018 - 05:03 PM.

  • Dragofer likes this

#8030 ERH+

ERH+

    Advanced Member

  • Member
  • PipPipPip
  • 607 posts

Posted 07 February 2018 - 05:11 PM

You may try to play and pause it via script:

http://wiki.thedarkm...sing_Animations


Edited by ERH+, 07 February 2018 - 05:13 PM.

  • teh_saccade likes this

S2wtMNl.gif


#8031 ERH+

ERH+

    Advanced Member

  • Member
  • PipPipPip
  • 607 posts

Posted 10 February 2018 - 07:23 AM

How to change the skin for a item spawned by ai as an attachment?


S2wtMNl.gif


#8032 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1368 posts

Posted 10 February 2018 - 08:37 AM

You can create a new entity for that, see this Wiki article. There you can just add the "skin" "[name of skin]" to the entity definition. There also might be another way, but I am not 100% sure, if this works. On the Wiki page about attaching props there is described how the inventory name can be changed:


"name_attach6" "gate_key"
"set inv_name on gate_key" "gate key"
"set name on gate_key" "gate_key"

After defining the name it might also be possible to use "set skin on [name]" "[name of skin]", but I am not sure if this works.


  • ERH+ likes this

#8033 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 37 posts

Posted 15 February 2018 - 02:58 PM

I think my thief has already killed enough spiders in my mission and thus I searched for new prey.

 

I thought I found it with the fire elementals. The problem is: they do not do as I command them to do.

 

I've created a square shaped path corner/wait sequence and connected everything together:

 

Elementals_are_doing_it_for_themselves.jpg

 

The movement showed ingame is different, it does not follow any structure. I tried it also with simple one way pathes and multiple elements, but the result is always the same.

 

What is my mistake?

 

It scares the hell out of me. What will they do next time? Break through the physical screen barrier and come after me?



#8034 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36797 posts

Posted 15 February 2018 - 03:44 PM

There is a setting that causes AI to wander around aimlessly rather than follow paths, like rats.  Elementals may use that by default.  Can't remember what it is off-hand.  Possibly "animal"?



#8035 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1368 posts

Posted 15 February 2018 - 05:32 PM

The spawnarg is "animal_patrol". I just checked and it is set to "1" by default for the elemental. So, when you turn it to "0" it should follow your path.



#8036 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12201 posts

Posted 15 February 2018 - 07:06 PM

The spawnarg is "animal_patrol". I just checked and it is set to "1" by default for the elemental. So, when you turn it to "0" it should follow your path.

 

Agreed. Set animal_patrol to 0.



#8037 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 37 posts

Posted 16 February 2018 - 05:22 AM

That worked, now they patrol as per the designated pathes.

 

Thanks a lot!



#8038 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5292 posts

Posted 16 February 2018 - 06:06 AM

I was actually wondering how I could get a drunk to stumble around... Well still need a stumbling walk animation.


Posted Image

#8039 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 85 posts

Posted 17 February 2018 - 10:42 AM

Got a couple of irritating glitches I'm trying to squash today... let's start with the numberwheel that comes with TDM 2.05, which causes a crash whenever the combination is changed after being opened once. See Goldwell's post here: http://forums.thedarkmod.com/topic/18525-beta-testing-205/?p=400078

What can I do about this? Is there a script that someone has made that will override the "closeBar" function, or should I try and figure out some way to make it unfrobbable after the correct combination is entered?



#8040 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5379 posts

Posted 18 February 2018 - 05:26 PM

Read the following posts dude. The script was specifically designed for "A new job" and is not meant for general usage. However, removing the "closeBar" call (as mentioned by me in the following posts) should solve your issues.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8041 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 85 posts

Posted Yesterday, 05:21 AM

Read the following posts dude. The script was specifically designed for "A new job" and is not meant for general usage. However, removing the "closeBar" call (as mentioned by me in the following posts) should solve your issues.

 

I did read it, but I'm not that familiar with scripting... I thougt that would require a custom script file to be added with the mission, hence my question if such a file already exists. I can do this with spawnargs (or some other way from within DR) is what you're saying?



#8042 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5379 posts

Posted Yesterday, 07:31 AM

Open the script file and delete the line "closeBar();".


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8043 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 85 posts

Posted Yesterday, 12:31 PM

OK, figured it out. For the next person with this problem let me post the solution here since it's not in writing anywhere else.

 

1. Open the archive tdm_base01.pk4 in something like 7zip
2. Navigate to the scripts folder and extract the file called "tdm_numberwheel_lock.script"
3. Open tdm_numberwheel_lock.script in a word processor like notepad and scroll down to the line that reads: "callGlobalFunction("closeBar",$safe_bar);" and delete the whole line.
4. Save the file (don't change the name and make sure the file type is still .script)
5. Make a folder called "scripts" in your project folder (the name of the map) and place the script file in here.

Now the custom script file overwrites the faulty stock TDM one, and it should no longer crash when you change the combination after unlocking it.


Edited by Bienie, Yesterday, 12:32 PM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users