Jump to content
The Dark Mod Forums

Apples and Peaches: Obsttorte's Mapping and Scripting Thread


Obsttorte

Recommended Posts

Ah. What if I def_attached a dummy entity to the AI? Does trigger_look care if the object is nodraw?

Link to comment
Share on other sites

I've tried this and it doesn't seem to work with nodraw. I can merge the scripts for you and upload it.

  • Like 1

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

Here ya go:

 

You have to see whether it does exactly what you want. If not it can be adjusted.

ai_trigger_look.script.txt

  • Like 1

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 new script stops the map from crashing, but I haven't been able to get the effect to work yet. How does the targeting work? In the testmap I sent, for example, I can't get the light to turn on when I look at the AI. Is the "target" spawnarg supposed to go directly on the AI?

Link to comment
Share on other sites

Yeah. Let the ai target the light.

  • Like 1

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

So does this look right?

 

{
"classname" "atdm:ai_builder_guard"
"name" "atdm_ai_builder_guard_1"
"origin" "790 40 4"
"scriptobject" "ai_trigger_look"
"target0" "atdm_lamp_electric_fancy_up_lit_1"
"team" "0"
}

 

Because I cannot get it to work.

Link to comment
Share on other sites

Yeah, looks good. Did you include the script?

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

Yes. I didn't include the old trigger_look script though...is that still needed?

Link to comment
Share on other sites

I've meant whether you have included the script in the tdm_custom_scripts.script file.

  • Like 1

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

It looks right. So if it is not working, it might be the best if you upload the map so I can take a look.

  • Like 1

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

Here's the map. The lights are supposed to go off if you look at the AI. If it works for you it means I've done something wrong including the script on my end.

 

 

Version 2
// entity 0
{
"classname" "worldspawn"
"editor_drLastCameraPos" "454.894 -106.732 48.5327"
"editor_drLastCameraAngle" "-5.7 20.1 0"
"editor_drMapPos1" "1738.55 1171.14 -520.531"
"editor_drMapAngle1" "14.7001 87.8977 0"
"editor_drMapPos2" "414.798 255.441 -264.933"
"editor_drMapAngle2" "2.10002 84.5976 0"
"editor_drMapPos3" "-749.97 -1606.21 -470.066"
"editor_drMapAngle3" "-3.29998 6.59757 0"
"editor_drMapPos4" "1014.05 -953.679 -556.857"
"editor_drMapAngle4" "-10.2 355.498 0"
"editor_drMapPos5" "987.599 3513.79 -319.877"
"editor_drMapAngle5" "-61.1999 172.198 0"
"editor_drMapPos6" "-1032.5 -2840 739.5"
"editor_drMapAngle6" "-77.0999 175.798 0"
"editor_drMapPos7" "952.822 285.005 1366.04"
"editor_drMapAngle7" "-74.8 149.373 0"
"editor_drMapPos8" "976 424 320"
"editor_drMapAngle8" "-3 15.3467 0"
"editor_drMapPos9" "409.146 547.464 392.83"
"editor_drMapAngle9" "-16.8 284.947 0"
// primitive 0
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 362 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 670 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 1068 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 1 14 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 546 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 412 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
}
// entity 1
{
"classname" "atdm:ai_builder_guard"
"name" "atdm_ai_builder_guard_1"
"origin" "790 40 4"
"scriptobject" "ai_trigger_look"
"target0" "atdm_lamp_electric_fancy_up_lit_1"
"team" "0"
"target1" "trigger_once_1"
}
// entity 2
{
"classname" "light"
"name" "light_1"
"light_center" "0 0 0"
"light_radius" "320 320 320"
"origin" "644 110 112"
"_color" "0.20 0.20 0.20"
"nodiffuse" "0"
"noshadows" "0"
"nospecular" "0"
"parallel" "0"
}
// entity 3
{
"classname" "info_player_start"
"name" "info_player_start_1"
"angle" "180"
"origin" "536 44 0"
}
// entity 4
{
"classname" "atdm:lamp_electric_fancy_up_lit"
"name" "atdm_lamp_electric_fancy_up_lit_1"
"light_center" "16 0 4"
"light_radius" "260 260 260"
"model" "models/darkmod/lights/non-extinguishable/electric_wall_fancy_up.lwo"
"origin" "666 -52 40"
}
// entity 5
{
"classname" "trigger_once"
"name" "trigger_once_1"
"model" "trigger_once_1"
"origin" "829 -57 27"
"target0" "atdm_moveable_holder_round_plus_candle2_1"
// primitive 0
{
brushDef3
{
( 0 0 1 -15 ) ( ( 0.02604166604578495 0 0 ) ( 0 0.02604166604578495 0 ) ) "textures/common/trigonce" 0 0 0
( 0 1 0 -27 ) ( ( 0.02604166604578495 0 0 ) ( 0 0.02604166604578495 0 ) ) "textures/common/trigonce" 0 0 0
( 1 0 0 -37 ) ( ( 0.02604166604578495 0 0 ) ( 0 0.02604166604578495 0 ) ) "textures/common/trigonce" 0 0 0
( 0 0 -1 -15 ) ( ( 0.02604166604578495 0 0 ) ( 0 0.02604166604578495 0.15625 ) ) "textures/common/trigonce" 0 0 0
( 0 -1 0 -27 ) ( ( 0.02604166604578495 0 0 ) ( 0 0.02604166604578495 0 ) ) "textures/common/trigonce" 0 0 0
( -1 0 0 -37 ) ( ( 0.02604166604578495 0 0 ) ( 0 0.02604166604578495 0 ) ) "textures/common/trigonce" 0 0 0
}
}
}
// entity 6
{
"classname" "atdm:moveable_holder_round_plus_candle2"
"name" "atdm_moveable_holder_round_plus_candle2_1"
"origin" "866 -138 6"
}

Link to comment
Share on other sites

Argh, fuck, sorry, it's my fault.

 

I forgot to mention that you have to set two spawnargs on the ai.

 

  • tol_angle - the maximum value of the angle between the players viewing direction and the direction towards the ai to activate the script
  • tol_distance - the maximum distance between player and ai to activate the script

I didn't implement default values for those like in the original script so not setting them will cause the script to never get activated. Setting those values will make it work.

 

Sorry :(

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

Obs, could you take a look at this map if you have a chance? I'm having difficulty with the look_script spawnargs.

 

Inside the safe is a scroll that uses the look_script to trigger a text message on the screen.

 

When I include the spawnarg, "distance" "300", then the message plays as soon as the player turns and looks at the safe. But if I change the value to "250" or less, the message will not play at all, no matter how close to the scroll I get. I don't understand quite what's going on. I only want the message to play when the player is very close to the scroll. Currently it's set to 250.

 

 

 

Version 2
// entity 0
{
"classname" "worldspawn"
"editor_drLastCameraPos" "698.704 -345.343 359.372"
"editor_drLastCameraAngle" "-51.9 122.1 0"
"editor_drMapPos1" "1738.55 1171.14 -520.531"
"editor_drMapAngle1" "14.7001 87.8977 0"
"editor_drMapPos2" "414.798 255.441 -264.933"
"editor_drMapAngle2" "2.10002 84.5976 0"
"editor_drMapPos3" "-749.97 -1606.21 -470.066"
"editor_drMapAngle3" "-3.29998 6.59757 0"
"editor_drMapPos4" "1014.05 -953.679 -556.857"
"editor_drMapAngle4" "-10.2 355.498 0"
"editor_drMapPos5" "987.599 3513.79 -319.877"
"editor_drMapAngle5" "-61.1999 172.198 0"
"editor_drMapPos6" "-1032.5 -2840 739.5"
"editor_drMapAngle6" "-77.0999 175.798 0"
"editor_drMapPos7" "952.822 285.005 1366.04"
"editor_drMapAngle7" "-74.8 149.373 0"
"editor_drMapPos8" "976 424 320"
"editor_drMapAngle8" "-3 15.3467 0"
"editor_drMapPos9" "409.146 547.464 392.83"
"editor_drMapAngle9" "-16.8 284.947 0"
// primitive 0
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 362 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 670 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 1068 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 1 14 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 -1070 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 546 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 0 1 -364 ) ( ( 0.0390625 0 255.765625 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 1 0 -672 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 0 -1 -16 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 0 -1 0 -548 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( -1 0 0 -414 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
( 1 0 0 412 ) ( ( 0.0390625 0 0 ) ( 0 0.0390625 0 ) ) "textures/darkmod/metal/flat/rusty_crusted_brownish" 0 0 0
}
}
// primitive 6
{
brushDef3
{
( 0 0 1 -47.25 ) ( ( 0.3333333432674408 0 84.66666412353516 ) ( 0 0.02777777798473835 112.3472213745117 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( 0 1 0 -133 ) ( ( 0.02777777798473835 0 16.65277671813965 ) ( 0 0.0235294122248888 1.111764669418335 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( 1 0 0 -599.5 ) ( ( 0.3333333432674408 0 84.66666412353516 ) ( 0 0.0235294122248888 1.111764669418335 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( 0 0 -1 4.75 ) ( ( 0.3333333432674408 0 84.66666412353516 ) ( 0 0.02777777798473835 16.65277671813965 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( 0 -1 0 130 ) ( ( 0.02777777798473835 0 112.3472213745117 ) ( 0 0.0235294122248888 1.111764669418335 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( -1 0 0 563.5 ) ( ( 0.3333333432674408 0 44.33332824707031 ) ( 0 0.0235294122248888 1.111764669418335 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
}
}
// primitive 7
{
brushDef3
{
( 0 -1 0 118.75 ) ( ( 0.02232143096625805 0 16.53236389160156 ) ( 0 0.0390625 127.869140625 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( 0 0 -1 25.25 ) ( ( 0.01953125 0 118.8916015625 ) ( 0 0.01953125 113.83984375 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( -1 0 0 563.75 ) ( ( 0.02232143096625805 0 10.27678871154785 ) ( 0 0.0390625 127.869140625 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( 0 1 0 -133.75 ) ( ( 0.02232143096625805 0 111.4520034790039 ) ( 0 0.0390625 127.869140625 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( 0 0 1 -28.25 ) ( ( 0.01953125 0 118.8681640625 ) ( 0 0.01953125 15.12890625 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
( 1 0 0 -599.75 ) ( ( 0.02232143096625805 0 117.7075881958008 ) ( 0 0.0390625 127.869140625 ) ) "textures/darkmod/metal/detailed/panel_square_dark01" 0 0 0
}
}
}
// entity 1
{
"classname" "light"
"name" "light_1"
"_color" "0.39 0.39 0.39"
"light_center" "0 0 0"
"light_radius" "320 320 320"
"nodiffuse" "0"
"noshadows" "0"
"nospecular" "0"
"origin" "582 200 112"
"parallel" "0"
}
// entity 2
{
"classname" "info_player_start"
"name" "info_player_start_1"
"angle" "180"
"origin" "585 -156.5 0"
}
// entity 3
{
"classname" "atdm:gui_message"
"name" "lock_message1"
"delay" "1"
"fade_out_time" "2"
"force" "1"
"gui" "guis/prologue.gui"
"lines" "3"
"origin" "106 243 135"
"show" "2"
"text" "Frob a specific numberwheel to adjust it."
}
// entity 4
{
"classname" "atdm:6panel_104x56"
"name" "safe_door"
"frob_bias" "1.5"
"frob_peer" "bar"
"frob_peer2" "func_static_2279"
"immune_to_target_setfrobable" "1"
"lock_peer" "bar"
"lock_picktype" "-"
"lock_pins" "0"
"locked" "1"
"model" "models/darkmod/containers/openable/metal_safe01_door_small.lwo"
"move_time" "2"
"origin" "561.98 104.792 2.25"
"rotate" "0 -90 0"
"rotation" "-1 0 0 0 -1 0 0 0 1"
"snd_close" "door_metal01_close"
"snd_locked" "metalbounce_1"
"snd_move" "door_metal01_move"
"snd_open" "door_metal01_open"
"snd_unlock" "frob_lever_metal_small_01"
"target0" "atdm_target_set_frobable_2"
"used_by" "-"
}
// entity 5
{
"classname" "func_static"
"name" "func_static_2213"
"model" "models/darkmod/containers/openable/metal_safe01_small.lwo"
"origin" "562 104.818 2.5"
"rotation" "-1 0 0 0 -1 0 0 0 1"
}
// entity 6
{
"classname" "atdm:handle_curved_rotate_left"
"name" "atdm_valve1_small_1"
"bind" "safe_door"
"model" "models/darkmod/mechanical/pipes/valve1_large.ase"
"move_time" "1"
"origin" "595.75 103.25 21.75"
"rotate" "90 0 0"
"snd_move" "door_metal01_move"
}
// entity 7
{
"classname" "func_static"
"name" "func_static_2365"
"model" "models/darkmod/readables/scroll_tied_up.lwo"
"once" "1"
"origin" "578 125.65 11.75"
"rotation" "0.99756 -0.0698185 0 0.0698185 0.99756 0 0 0 1"
"scriptobject" "trigger_look"
"skin" "readables/scroll_red_tie"
"target0" "lock_message1"
"distance" "250"
}
// entity 8
{
"classname" "atdm:combination_lock_small"
"name" "func_static_2279"
"bind" "safe_door"
"combination" "162"
"frob_bias" ".01"
"frob_distance" "0"
"frobable" "1"
"model" "models/darkmod/mechanical/combination_housing01_small.lwo"
"origin" "577 104.75 19"
"skin" "bright_combination_housing"
"target0" "safe_door"
"frob_peer" "safe_door"
}
// entity 9
{
"classname" "atdm:mover_door_sliding"
"name" "bar"
"bind" "safe_door"
"frob_distance" "1"
"locked" "1"
"model" "models/darkmod/containers/openable/metal_safe01_door_small_bar.lwo"
"move_time" ".8"
"origin" "562 104.75 2.25"
"rotate" "0 0 0"
"rotation" "-1 0 0 0 -1 0 0 0 1"
"snd_close" "nosound"
"snd_locked" "nosound"
"snd_open" "nosound"
"snd_unlock" "nosound"
"translate" "9 0 0"
}
// entity 10
{
"classname" "light"
"name" "light_2"
"origin" "578.5 -186 112"
"light_center" "0 0 0"
"light_radius" "320 320 320"
"_color" "0.15 0.17 0.18"
"nodiffuse" "0"
"noshadows" "0"
"nospecular" "0"
"parallel" "0"
}

 

Link to comment
Share on other sites

Please get used to uploading the files instead of its content.

 

The error however was in the script itself. There was a command missing :blush:

 

Here is the corrected script.

 

 

trigger_look.script.txt

  • Like 1

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

When I click on the file, I just get an error saying it can't find it...?

 

We could not find the attachment you were attempting to view.

 

Link to comment
Share on other sites

  • Like 1

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

That's an improvement...it works up to a "distance" value of "100" now. Anything less than that and it seems to stop working again.

Link to comment
Share on other sites

Well, that's odd. Maybe you have to choose a bigger eps on such short distances?!

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 tolerance value set on the entity using the script. It defines how big the angle between the players viewing direction and the direction towards the object can be.

 

Or, to be more precise: playerLooksAtEntity if cosine(alpha)>1-eps, where alpha is said angle.

 

Mathematicians tend to refer to small, positive values as eps. :)

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

This is the bit from the wiki:

 

- "entityname": The entity to react to (default is player1, thus meaning the player) - "stim": the stim used to enable this object (default is PLAYER_STIM) - "distance": how close the entity must be (default: 1024) - "tolerance": describes how exact the player (or another entity) must look (default: 0.1) - "once": if set to one, the entity will trigger it's targets only once (default: 0)

 

 

What value should I set for "tolerance"? I'm not sure how to interpret a default value of 0.1

Link to comment
Share on other sites

The tolerance is one minus the cosine of the angle that is allowed to be between the players viewing direction and the direction towards the object.

post-11230-0-27447700-1477639624_thumb.jpg

  • Like 2

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 looked up the definition of cosine. It didn't help.

 

Let's say I want the player to be able to trigger the object as long as it is within a 90 degree xy arc of the direction he is looking. What value would I set "tolerance" to?

post-9-0-17263400-1477677949.jpg

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