Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

When using the location system, you can also get the location of any entity via the getLocation() script function. However, using the objective system or a trigger_entityname is probably more convenient.

 

Regarding your player block problem: the easiest way is to use a door as suggested by demagogue. I've tested it and it works. You just have to make sure to set the snd_close and snd_open spawnargs to nosound, make it unfrobable and overwrite the AI_USE spawnarg so the ai doesn't handle it as a door, they can walk thorugh it anyways.

 

Regardin hide. A hidden object is still present, it just don't get rendered. Maybe that's the reason why this approach didn't 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

If it is a specific item (like a special key or so) it makes sense to track whether the player has picked it up instead of trying to check for it later.

 

Besides that the most straightforward way is to use the objective system. There is an objective type that checks whether the player posesses a specific item. You can make it invisible and reversable and check its state via float getObjectiveState(float ObjNum). ObjNum is the number of the objective (counting starts at 1 :sic:). The return values are 0 (not completed), 1 (completed), 2 (invalid), 3 (failed).

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 playerclip thing to block player but ai is not resolved.

 

I tried using a player clip brush as a sliding door. The AI can walk through a player clip brush that the player can't,

and he can also do it when that brush is a door entity, which also blocks the player.

 

However the moment you try to control it with a trigger the AI is blocked. ie

in the room, I have a setup to unlock the library door to let the player in 64 seconds after the

AI enters. A trigger relay does that. If I use the same trigger relay to open the player_clip door, it blocks the AI

from entering the room in the first place. That is the only difference to the test setup. Makes no sense, it should

work.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Doy you have a test map?

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

Doy you have a test map?

 

Hey Obs, yeh I do mate. I'm puzzled. The test map works, but in my mission it doesn't.

 

I have a AI pass through playerclip door entity, hit an entityname_once, which triggers a delayed trigger relay which triggers

the playerclip door. This is the setup in game. I need this trigger_relay to control it.

 

In this test map it all works perfectly, however when I put the same setup in my mission, the AI is stopped by the playerclip, and can't reach the door (normal) on

the otherside of the playerclip door. In the test map. I just don't get why in my mission the same thing won't work. Maybe you can see where the problem

is, I think I might be too close to it.

 

The door is the murder scene hall door (not the one to the bedroom). Just inside that door is a trigger_relay with a 64 second delay. This needs to target the player_clip

currently setup in front of the door. The exact same setup as the test map but the AI is blocked. This is the room above the end of the gallery.

 

Here's the test.map

 

 

 

Version 2
// entity 0
{
"classname" "worldspawn"
"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"
"editor_drLastCameraPos" "10.5719 -783.255 -38.8566"
"editor_drLastCameraAngle" "-26.1 157.5 0"
// primitive 0
{
brushDef3
{
( 0 0 1 -448 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 1 0 448 ) ( ( 0.0078125 0 255 ) ( 0 0.0078125 2.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 1 0 0 -192 ) ( ( 0.0078125 0 1 ) ( 0 0.0078125 0.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 -1 0 -960 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( -1 0 0 -320 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 -1 384 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -384 ) ( ( 0.0078125 0 255.5 ) ( 0 0.0078125 0.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 1 0 384 ) ( ( 0.0078125 0 255 ) ( 0 0.0078125 2 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 1 0 0 -192 ) ( ( 0.0078125 0 0.5 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 -1 -128 ) ( ( 0.0078125 0 255.5 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( -1 0 0 -320 ) ( ( 0.0078125 0 0.5 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 -1 0 -448 ) ( ( 0.0078125 0 255 ) ( 0 0.0078125 2 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -384 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 1 0 448 ) ( ( 0.0078125 0 255.5 ) ( 0 0.0078125 2 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 1 0 0 -256 ) ( ( 0.0078125 0 1 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 -1 -128 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 -1 0 -960 ) ( ( 0.0078125 0 255.5 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( -1 0 0 192 ) ( ( 0.0078125 0 1 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 1 0 448 ) ( ( 0.0078125 0 255 ) ( 0 0.0078125 1.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 1 0 0 -192 ) ( ( 0.0078125 0 1 ) ( 0 0.0078125 255.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 -1 -192 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 -1 0 -960 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 255.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( -1 0 0 -320 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 255.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 1 128 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -384 ) ( ( 0.0078125 0 0.5 ) ( 0 0.0078125 0.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 1 0 0 -192 ) ( ( 0.0078125 0 1.5 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 -1 -128 ) ( ( 0.0078125 0 0.5 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 -1 0 -1024 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( -1 0 0 -320 ) ( ( 0.0078125 0 255.5 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 1 0 960 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 0 1 -384 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 1 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 1 0 448 ) ( ( 0.0078125 0 254.5 ) ( 0 0.0078125 2 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 -1 -128 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 255.5 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 -1 0 -960 ) ( ( 0.0078125 0 0.5 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( -1 0 0 -384 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 1 0 0 320 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
}
}
// primitive 6
{
brushDef3
{
( 0 0 1 -480 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 1 0 448 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 1 0 0 64 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 -1 -256 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 -1 0 -712 ) ( ( 0.0078125 0 255.9375 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( -1 0 0 -128 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
}
}
// primitive 7
{
brushDef3
{
( 0 0 1 -480 ) ( ( 0.0078125 0 2.25 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 1 0 712 ) ( ( 0.0078125 0 255.875 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 1 0 0 64 ) ( ( 0.0078125 0 2.25 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 -1 0 -960 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( -1 0 0 -128 ) ( ( 0.0078125 0 253.75 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 -1 -24 ) ( ( 0.0078125 0 2.25 ) ( 0 0.0078125 0.3125 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
}
}
// primitive 8
{
brushDef3
{
( 0 1 0 768 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 1 0 0 64 ) ( ( 0.0078125 0 2.25 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 -1 -256 ) ( ( 0.0078125 0 2.5 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 -1 0 -960 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( -1 0 0 -128 ) ( ( 0.0078125 0 253.75 ) ( 0 0.0078125 0 ) ) "textures/darkmod/metal/flat/brush_steel_scratched01" 0 0 0
( 0 0 1 24 ) ( ( 0.0078125 0 2.25 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
}
}
}
// entity 1
{
"classname" "light"
"name" "light_1"
"light_center" "0 0 0"
"light_radius" "320 384 368"
"origin" "32 -736 112"
}
// entity 2
{
"classname" "atdm:ai_builder_acolyte"
"name" "accolyte"
"can_unlock" "door"
"origin" "144.885 -735.941 -126.569"
"rotation" "-1 0 0 0 -1 0 0 0 1"
"target0" "path_corner_1"
}
// entity 3
{
"classname" "path_corner"
"name" "path_corner_1"
"angle" "180"
"origin" "80 -744 -128"
"target0" "path_corner_2"
}
// entity 4
{
"classname" "path_corner"
"name" "path_corner_2"
"angle" "-3.50835456e-15"
"origin" "-256 -736 -128"
}
// entity 5
{
"classname" "info_player_start"
"name" "info_player_start_1"
"angle" "135"
"origin" "144 -840 -128"
}
// entity 6
{
"classname" "light"
"name" "light_2"
"light_center" "0 0 0"
"light_radius" "320 384 368"
"origin" "-272 -736 112"
}
// entity 7
{
"classname" "trigger_entityname"
"name" "trigger_once_entityname_1"
"entityname" "accolyte"
"model" "trigger_once_entityname_1"
"origin" "-268 -710 110"
"target0" "trigger_relay_1"
// primitive 0
{
brushDef3
{
( 0 0 1 -238 ) ( ( 0.015625 0 124 ) ( 0 0.015625 1.375 ) ) "textures/common/trigentityname_once" 134217728 0 0
( 0 1 0 -222 ) ( ( 0.015625 0 127.125 ) ( 0 0.015625 0 ) ) "textures/common/trigentityname_once" 134217728 0 0
( 1 0 0 -36 ) ( ( 0.015625 0 0 ) ( 0 0.015625 4.875 ) ) "textures/common/trigentityname_once" 134217728 0 0
( 0 0 -1 -238 ) ( ( 0.015625 0 0 ) ( 0 0.015625 127 ) ) "textures/common/trigentityname_once" 134217728 0 0
( 0 -1 0 -222 ) ( ( 0.015625 0 1 ) ( 0 0.015625 0 ) ) "textures/common/trigentityname_once" 134217728 0 0
( -1 0 0 -36 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/common/trigentityname_once" 134217728 0 0
}
}
}
// entity 8
{
"classname" "atdm:mover_door_sliding"
"name" "nogo"
"locked" "0"
"model" "nogo"
"origin" "-68 -740 -76"
"translate" "0 56 0"
"translate_speed" "200"
"sound_open" "0"
"sound_close" "0"
"sound_move" "0"
"snd_locked" "0"
"snd_lock" "0"
"snd_unlock" "0"
"snd_wrong_key" "0"
// primitive 0
{
brushDef3
{
( 0 0 1 -52 ) ( ( 0.03125 0 0 ) ( 0 0.03125 127 ) ) "textures/common/player_clip" 0 0 0
( 0 1 0 -28 ) ( ( 0.03125 0 1 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
( 1 0 0 -4 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
( 0 0 -1 -52 ) ( ( 0.03125 0 0 ) ( 0 0.03125 1 ) ) "textures/common/player_clip" 0 0 0
( 0 -1 0 -28 ) ( ( 0.03125 0 127 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
( -1 0 0 -4 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
}
}
}
// entity 9
{
"classname" "atdm:lamp_wall_gasflame03_lit"
"name" "light"
"light_center" "-1 0 7"
"origin" "-50.8 -659 -41"
"rotation" "-1 0 0 0 -1 0 0 0 1"
"s_shader" "gaslight"
"extinguished" "1"
}
// entity 10
{
"classname" "trigger_relay"
"name" "trigger_relay_1"
"origin" "-200 -728 -88"
"delay" "5"
"target0" "nogo"
"target1" "light"
"target2" "door"
}
// entity 11
{
"classname" "atdm:6panel_104x56"
"name" "door"
"origin" "-93.395 -767.455 -127.962"
"rotation" "0 -1 0 1 0 0 0 0 1"
"locked" "1"
"rotate" "0 90 0"
"used_by" "accolyte"
}

Here's the latest version of my mission. Hopefully you can find where I'm messing up. With the playerclip over the door, the mission won't play properly till this is resolve, or it's removed.
Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

I've just taken a look and am not able to reproduce the error. It works fine on my side. :(

 

It was only a rough test, though. Will play the whole mission tonight and see what happens.

 

As this is for one-time-use only (you forgot to mention that ;) ), you don't have to use a door for the setup. You could just use a func_static instead, and than remove it later on. The fact that you are using two doors close together (the clip one and the real one leading to the room) may cause odd interferences. I noticed that the ai tends to open the invisible door, but only when leaving the room, not upon entering.

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

In or

 

I've just taken a look and am not able to reproduce the error. It works fine on my side. :(

 

It was only a rough test, though. Will play the whole mission tonight and see what happens.

 

As this is for one-time-use only (you forgot to mention that ;) ), you don't have to use a door for the setup. You could just use a func_static instead, and than remove it later on. The fact that you are using two doors close together (the clip one and the real one leading to the room) may cause odd interferences. I noticed that the ai tends to open the invisible door, but only when leaving the room, not upon entering.

 

In order to reproduce it. Notarget, noclip down to the dungeon area, to the private room. Get the book out of the chest, and drop it

in the stewards room on the dresser, pick up the key and follow him as normal. When you get to that room, he won't be able to go

through the playclip door.

 

I don't know how to use the func_static method. I've heard of it before. You mean using the hide 1? That didn't work.

Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Said method would be a func_static brush of playerclip obstructing the room, then removing it when the player may enter.

 

I've been able to lean-glitch my way through 16-unit playerclip walls easily, so the brush should be insanely thick, i.e. fill the whole room.

 

Removing the func_static can be done via a script function ($player_clip.remove(); ), or alternatively use a trigger_relay that targets a func_remove (iirc) that targets the playerclip.

Edited by Dragofer
Link to comment
Share on other sites

Yeh others have mentioned the func_static route too, but as I've said before, I have zero clues about scripts. So when you say you can just use

a script function is like asking a toaster to make you a cup of coffee. I know what you mean, but have no idea how to do it.

 

Abuseimplea, said the same thing and had a way to do it, but I had the same problem with it. [scroll up two messages]

 

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-14/page-5?do=findComment&comment=410983

Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

You don't need script, use a func_remove.

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

Indeed, there are multiple ways to get this done. It doesn't hurt to get some practice as scripting is a useful skill, and this is a suitable opportunity, so if you're so inclined, add this to your .script file:

 

void player_clip_remove()

{

$player_clip.remove();

}

 

Here's little bit of anatomy of that script function:

- void player_clip_remove() is the standard way of setting up a thread (aka a 'script'). The name of this thread is player_clip_remove.

- when you want to reference an ingame entity, put a $ before its name

- some script commands don't need anything in their brackets, others do, i.e. sys.wait(4); or sys.trigger($test_entity);. Take a look at existing maps to see how the commands are used properly.

- end all script commands with a ;

 

Name your playerclip brush: player_clip. To call the thread create a target_callscriptfunction, give it the spawnarg: call player_clip_remove. When the player may enter, trigger the target_callscriptfunction by your method of choosing.

  • Like 1
Link to comment
Share on other sites

Thanks for that Dragofer. I've set that out exactly as you said, added a delay 64 to the call player_clip_remove so that it removes it 64 seconds

after the player touches the trigger that calls the script. There's a problem.

 

The map loads, but there's just a black screen with the light gem and the mission audio, but no level loads. What causes this? So I can't test if this

method solves it, until I find a solution to this problem.

 

Thanks

 

Neon

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

You can most probably solve that by deleting all dmap files (everything except .map, .script and .darkradiant), then recompiling.

 

I've gotten that error a lot when map load failed because of a script error. I'd fix the error, but then loading the map again resulted in a blurry closeup of a random texture filling the screen, not being able to move or use the inventory, and hearing the ambient soundtrack.

Link to comment
Share on other sites

It doesn't hurt to get some practice as scripting is a useful skill

I highly second this statement.

void player_clip_remove()

{

$player_clip.remove();

}

 

Here's little bit of anatomy of that script function:

1. void player_clip_remove() is the standard way of setting up a thread (aka a 'script'). The name of this thread is player_clip_remove.

2. when you want to reference an ingame entity, put a $ before its name

3. some script commands don't need anything in their brackets, others do, i.e. sys.wait(4); or sys.trigger($test_entity);. Take a look at existing maps to see how the commands are used properly.

4. end all script commands with a ;

1. This is neither a thread nor a script (well, it is part of it),it is a function

3. and the behaviour of functions can be controlled by arguments. However, some of them may be intented to always do the same thing, like in this case, so there is no need to provide additional informations. The brackets are still important, even if they are empty, because they are needed for the game to recognize that this is a function.

 

I hope I didn't sound like an arsehole now :unsure:

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

No worries, my intention was to convey that all it takes is a handful of lines of knowledge to start running scripts in your map. I look forward with anticipation to your thorough scripting introduction.

Link to comment
Share on other sites

Once I find the time :( Maybe in a few weeks when I have off next time.

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

@Dragofer, that script didn't work. I've set it up exactly, except for adding a delay of 64 seconds before

the clip is removed. It needs to stay closed to block the player for 64 seconds.

 

Setup:

 

func_static brush named player_clip

atdm:target_callscriptfunction named playerclip with call player_clip_remove and delay 64 (seconds till scene is finished then the playerclip is opened to let the player in).

trigger_once with target0 playerclip (the call the script entity).

 

The script is copy pasted from what you added. In game, the player walks right through the playerclip. I'm guessing

the delay didn't work, and it opened the moment the player touched the trigger_once.

 

Noted about the scripting information. I'd like to learn this.

 

 

Thanks

Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

I'm not sure if you can use the delay spawnarg on a callscriptfunction entity - try adding the line sys.wait(64); to the beginning of that script instead of the spawnarg.

Link to comment
Share on other sites

Alternatively you could

  • use a trigger_relay between the trigger_once and the target entity and add the delay there
  • call the script via the conversation at the end.

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

Both those methods work partially. When the clip opens though it crashes the game. Using either the syswait, or the trigger_relay

the same thing happens, the moment the clip is removed (i'm assuming), with a 10 sec delay, after 10 seconds the game crashes. It does

it every time. Here's the current setup

 

func_static player_clip clip brush

trigger_once targeting a trigger_relay called clip_control

trigger_relay with delay 5 targets playerclip

call script entity called playerclip which calls player_clip_remove

 

The clip is present when you get there, 5 seconds later the game crashes every time. I do a debug dump, but I don't

know how to do it. I googled it, but couldn't find it. Will look again later.

Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Then it sounds like you have some problem with the script that crashes it, a syntax error or whatever, since it's hard to imagine how the entities and their targeting things by themselves could do it.

Post the script you have and (I recommend) put it in code tags inside spoiler tags.

 

And remember the basic stuff like the script has to have the file name the same name as the map, and it's just a text file with a "script" file type, so like: map44.script (if you're map was named map44.map), and it has to be in the same folder as the map file. Then inside the script file you're creating the function, like

void player_clip_remove()
{
[code goes here]
} 

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

 

Then it sounds like you have some problem with the script that crashes it, a syntax error or whatever, since it's hard to imagine how the entities and their targeting things by themselves could do it.

Post the script you have and (I recommend) put it in code tags inside spoiler tags.

 

And remember the basic stuff like the script has to have the file name the same name as the map, and it's just a text file with a "script" file type, so like: map44.script (if you're map was named map44.map), and it has to be in the same folder as the map file. Then inside the script file you're creating the function, like

void player_clip_remove()
{
[code goes here]
} 

 

This is the script that I'm using, there is other functions above this, I also included the main part to show there's no syntax there. It

all looks fine.

 

void player_clip_remove()
{
$player_clip.remove();
}
void main()
{
}

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Is there a way to disable the engines' small triangle optimization that makes some (not all) somewhat spiky triangles of brushes, funcstatics and patches disappear?

 

It gets tedious to work around that by continously exporting and reimporting everything as ASE models. I would be fine with having to explicitly chalk each and every surface that should be ditched if it would stop the engine from punching holes into my geometry.

That must have annoyed mappers before...

Link to comment
Share on other sites

It sometimes helps to turn the specific stuff into func_static. Otherwise you could try to dmap with noOpt. so

dmap noOpt mapname

However, this may decrease performance performance and cause other graphic glitches.

 

In addition, I don't think the removal is based upon the size of a triangle, but on its condition instead. The condition of a triangle is the ratio of the radii of the inner and the outer circulum. Triangles with high conditions will introduce heavy rounding errors, which can result in graphic glitches etc..., thus they should normally be avoided. If you have such triangles, for example on a heavely bend high patch, it might help to split them up, or in case of patches simple use several patches instead of one.

 

post-11230-0-95057400-1503652303_thumb.jpg

  • 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

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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...