Jump to content
The Dark Mod Forums

STRUNK

Member
  • Posts

    479
  • Joined

  • Last visited

  • Days Won

    14

Posts posted by STRUNK

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

    • Like 1
  2. @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

  3. Giants and Ghosts

    STRUNK-2020-01-11-21-35-04.jpg

    Video

    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.

    camerascreentransparent.mtr GandG.map

    • Like 2
    • Thanks 1
  4. @Dragofer

    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__

     

    • Like 1
  5. @grayman

    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.

  6. @Dragofer

     

    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

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

     

  8. @JackFarmer

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

  9. @Dragofer

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

  10. @Dragofer

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

  11. @Dragofer

    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 : )

     

×
×
  • Create New...