-
Posts
479 -
Joined
-
Last visited
-
Days Won
14
Posts posted by STRUNK
-
-
I joined december 2018 but added a profile picture just some weeks ago, so after june 2019.
-
@greebo
New DMP file + a video showing what I do https://easyupload.io/xm9u56
It freezes when I dubbleclicked the texture, go with my pionter out of the media browser and press s (2:20 in the vid .. forgot to record the pointer). I didn't click outside the media browser yet, so normally it would input s into the little searchfield in de MB. I tried to recreate it with just a brush, but then no problems. With this more complex brush and the caulk if freezes. Yesterday I got back to 2.60 to do the same and there I had no problems. By the way, I press s before clicking outside the media browser half the time ...
Windows version = Windows 7 professional. Servicepack 1
-
DR froze on pressing s to bring up the surface inspector. I tried it a second time after a restart and it worked, but not when I pressed s again.
Got 2 DMP files zipped : https://filebin.net/5fzt7v0g1w59rhr5
Have fun coding
-
Thanx greebo, and have fun coding!
- 1
-
Only 1 thing I can think of is copy the page source of your profile page and profile page /photo/, paste it in textfiles and share it with @Springheel so he, or some other admin/developer can take a look at it and see if there is something missing/wrong in the code.
I use firefox and my page source for ... /photo/ is 1574 lines long when I View Page Source.
- 1
-
Ok, that sucks.
-
-
Not me. I see the edit button.
Did you try manually adding /photo/ to the addres of your profile page?
When I click edit it goes to this address: https://forums.thedarkmod.com/index.php?/profile/38387-strunk/photo/
-
Giants and Ghosts
These are made with a custom material (camerascreentransparent) that is attached below. Put this file in the materials folder in your mission directory. Shows up in Other Materials .
It's actually a representation of what a camera "sees", on a transparent screen. The camera is set up in a black box and it "sees" an idle ai that is also placed in there.
Explore the .map file, attached below to see what's really going on.
- 2
- 1
-
You are totally right. Wanting to println all 3 "strings" got me confused, for an entity can't be printed. I changed it now and it works.
Working script:
Spoiler#ifndef __TARGET_KEYVAL__
#define __TARGET_KEYVAL__object target_keyval
{
entity m_target_name;
string m_key;
string m_value;
void init();
void set_key_value();
};void target_keyval::init()
{
m_target_name = getEntityKey("target0");
m_key = getKey("set_spawnarg");
m_value = getKey("set_value");}
void target_keyval::set_key_value()
{
m_target_name.setKey(m_key , m_value );}
#endif __TARGET_KEYVAL__
- 1
-
When I put m_target_name.setKey(m_key, m_value); there I get an error:
Error: file fms\STRUNK\script\target_keyval.script, line 24: type mismatch for '.'
Line 24 is: m_target_name.setKey(m_key,m_value );
-
Uhm ... wel, if I knew it existed I would. I have found it now, but it's not in the targets folder. Thanx! : )
The key and value to use doesn't show up in the spawnargs of the target_setkeyval, I had to look it up in the target.def file:
"editor_var keyval" "Separate key val with semicolon... key;val"
But yes, I tried it and it works ... so no need to make a new script for it.
-
Could be. I didn't try in map script. Maybe it should somehow be in an other syntax, or should be "fed" different but I tried all combinations, leaving at least one value "fed" by the script, but it only works if I manually type all values.
Here is defenition:
Spoiler//Custom definition for target_keyval
entityDef target_keyval
{
"inherit" "atdm:target_base"
"spawnclass" "idTarget"
"editor_displayFolder" "Targets"
"editor_usage" "This function can change the key value of a spawnarg of a targeted entity."
"editor_color" "1 0 0"
"editor_mins" "-3 -3 -3"
"editor_maxs" "3 3 3"
"editor_var 1_set_ spawnarg" "Name of the spawnarg that should get a different value"
"editor_var 2_set_ key" "Changes the key value of the set spawnarg of the targeted entity"
"nodraw" "1"
"scriptobject" "target_keyval"
"frob_action_script" "set_key_value"
"set_spawnarg" "Name of the spawnarg"
"set_value" "New value for the spawnarg"
//Stim/Response to call the frob_action_script when triggered.
"sr_class_1" "S"
"sr_type_1" "STIM_TRIGGER"
"sr_state_1" "1"
"sr_class_2" "R"
"sr_type_2" "STIM_TRIGGER"
"sr_state_2" "1"
"sr_effect_2_1" "effect_frob"
"sr_effect_2_1_arg1" "_SELF"
}Summoning @Obsttorte : P
-
I'm trying to make a new target entity called target_keyval to be able to change the spawnarg value of an entity, like a door. So far the script is running and the sys.println(); prints the right strings to the console, but it does not work . Somehow $target_name.setKey("m_key","m_value"); doesn't take the strings I try to feed it. When I put it manually in the script it does work ...
#ifndef __TARGET_KEYVAL__ #define __TARGET_KEYVAL__ object target_keyval { string m_target_name; string m_key; string m_value; void init(); void set_key_value(); }; void target_keyval::init() { m_target_name = getKey("target0"); m_key = getKey("set_spawnarg"); m_value = getKey("set_value"); } void target_keyval::set_key_value() { $m_target_name.setKey("m_key", "m_value"); //When I manually put $atdm_3panel_104x56_1.setKey("trigger_on_open","0"); it works. sys.println(m_target_name); sys.println(m_key); sys.println(m_value); } #endif __TARGET_KEYVAL__
Does anyone have a clue how to fix this?
-
That's pretty weird indeed, Do you have filters on in darkradiant that might prevent you from seeing these in the editor? Did you try selecting only the arches and moving them up, and then see ingame if these "pataches" also moved? Did you try deleting things 1 by one, each time checking in game if the "patches" are still there, to sort out where they come from? Did you make it all func_static?
Just a few suggestions, for I really don't know what this is ...
-
-
I have video's from streamable.com .. and they don't show up, only the link ... But I guess that's just how it is then : )
-
It can't be downloaded anymore. Can you re-upload it? This is a mf good looking set of buttons.Sorry I wasn't looking. Have downloaded it now : )
And if you might have time to much, I would like a 5 button version for my diorama ^^ https://streamable.com/7xy8n
With your custom square buttons it already looks very good:
- 2
-
How to embed a video on the forum??
-
- Popular Post
- Popular Post
The Turret.
VIDEO
The Turret works with a little script with 2 functions in it. These functions are called by "atdm:target_callscriptfunction"s (the yellow cubes in the picture) and are triggered by "trigger_timer"s (the purple cubes in the picture). "trigger_timer"s can be triggered on and of by other triggers.
In the spoiler I put the script, with, i hope, as many information you need to understand a bit what is going on, so you can adjust it to your needs. You can use the script as is and give your own entities the same names as the entities in the script. (Script is also in the Turret.pk4)
Spoilervoid MoveToPlayer()
{
//Makes $BindToThis move to $player1 and back to &ReturnToThis, and triggers speakers and func_emiters on and off
//This function is triggerd/called by an atdm:target_callscriptfunction
//All speakers, func_emitters and the trigger_hurt need spawnarg "bind" "BindToThis" to follow entity "BindToThis" (func_mover)
float distance = $ReturnToThis.distanceTo($player1); //Defines that float (number) "distance" will be the distance between entity "the player" (is always $player1)
//and entity "ReturnToThis". $ in the script means entity.
vector head = $player1.getEyePos(); //Defines that vector (3 numbers) "head" wil be the position of the eyes of the player.
$BindToThis.time (distance/750); //Sets the time entity "BindToThis" (func_mover) takes to travel to it's new position. Changing "750" will change the speed.sys.trigger($ProjectileFx1); //Triggers entity "ProjectileFx1" (func_emitter) and activates it.
// --- Func_emitters need spawnarg "start_off" "1" to be incative at game start. ---
sys.trigger($ProjectileFx); //Triggers entity "ProjectileFx" (func_emitter) and activates it.
sys.trigger($Sound1); //Triggers entity "Sound1" (speaker) and activates it.
//This speaker plays the sound you hear when entity "BindToThis" is moving.
// --- Speakers need the spawnarg "s_waitfortrigger" "1" to be inactive at game start. ---
sys.trigger($Hurt); //Triggers entity "Hurt" (trigger_hurt) and activates it.
// --- Trigger_hurt needs the spawnarg "on" "0" to be inactive at game start. ---
$BindToThis.moveToPos(head); //Tells entity "BindToThis" (func_mover) to move to it's new position "head",
//that was earlier in the script defined as the position of the players eyes.
sys.wait(distance/750-(distance/750-(distance-11)/750)); //Tells the script to wait distance/750-(distance/750-(distance-11)/750) seconds before going to the next line.
//The calculation is meant to wait for the total move time,
//minus the time it takes to move 11 doom units at the same speed.
$BindToThis.stopMoving(); //Tells entity "BindToThis" (func_mover) to stop moving.
//Due to the calculation before this, it stops about 11 doom units in front of the players eyes
sys.trigger($ProjectileFx1); //Triggers entity "ProjectileFx1" (func_emitter) again and deactivates it.
sys.trigger($ProjectileFx); //Triggers entity "ProjectileFx" (func_emitter) again and deactivates it.
sys.trigger($Sound2); //Triggers entity "Sound2" (speaker) and activates it.
//This speaker plays the sound of an explosion.
sys.wait(0.3); //Tells the script to wait 0.3 seconds before going to the next line.
sys.trigger($Sound1); //Triggers entity "Sound1" (speaker) again and deactivates it.
sys.trigger($Hurt); //Triggers entity "Hurt" (trigger_hurt) again and deactivates it.
sys.wait(2); //Tells the script to wait 1.5 seconds before going to the next line.
//Particle effect (from func_emitters) tend to "fade_out" after being deactivated.
//This wait time is needed to prevent them from still being visable when they return to the start position.
$BindToThis.moveTo($ReturnToThis); //Tells entity "BindToThis" (func_mover) to move back to entity "ReturnToThis" (func_static).
}
void LookAtPlayer()
{
//Makes $Statue turn towards $player1
//This function is triggerd/called by a atdm:target_callscriptfunction
vector direction=$Statue.getOrigin()-$player1.getOrigin(); //Defines that vector (3 numbers) "direction" wil be the origin/position of entity "Statue" (func_static)
//minus the origin/position of the player.
direction_z=0; //Defines that the value of z in the vector "direction" is 0
$Statue.setAngles(sys.VecToAngles(-direction)+'0 90 0'); //Sets the rotation of entity "Statue" to sys.VecToAngles(-direction)+'0 90 0'
//I don't know what this calculation does, but it works.
//I got it out of Obsttorte's looking statue script.
}In the Turret.pk4 is the mission folder with in it the map folder and the sound folder. In the map folder is the Turret.map file and the Turret.script file. They both have to have the same name otherwise the script won't load, and won't work. In the sound folder is the soundshader Turret.sndshd that is needed for the custom explosion sound I made (from a thundersound that is already in the game) to be loaded. A soundshader file is actually very simple to make, and adding custom sounds to your map is therefor very easy. The audiofile is in the sfx folder, that's also in the sound folder.
Questions? Ask them.
Have fun : )
- 5
-
They are in the def file, and I get a blu escreen when something in the reuseable script is not in the right syntax. I can't find the syntax to put the void ResponseEnable(float type, float state); in the mover_move script, so I showed the spawnags. Maybe you know what the right syntax should be?
It should work from the script folder in the end ... : )
-
"sr_class_1" "S" "sr_type_1" "STIM_TRIGGER" "sr_state_1" "1" "sr_class_2" "R" "sr_type_2" "STIM_TRIGGER" "sr_state_2" "1" "sr_effect_2_1" "effect_frob" "sr_effect_2_1_arg1" "_SELF"
I can't find any way to put it in the script without having a blue screen ... above the s/r values
It would be fancy to have it be able to be blocked, and move on when unblocked. It woud be interruptble also that way. But I wouldn't know how. Maybe check the script for doors .. ?
-
-
As what the sound concerns. I have set them to nosound by default. I tried some non looping sounds and heard something so thought: it works. I'll have a look in some sound fade event I saw.
About s/r, I saw it in some defs .. don't now witch one, there I got the idea. I'm trying now to change the spawnarg/keys that call the scripts, to stop mover_move to react to trigger/frob input, but with no succes. So looking to manipulate s/r seems a good next approach. Somehow this is like a puzzle game on it's own, you only have to set your own objectives : )
"thieving event" ideas:
in The Dark Mod
Posted
@Jetrell
Just a thought.
Have npc's/guards get in a fight by throwing things at them so they knock eachother out?
Two grumpy guards already having an argument, and when you throw something (applecore, empty bottle, horsedung) from the direction of one of the npc's/guards, they'll get in a fight, and you can steal whatever they were guarding ...