Jump to content
The Dark Mod Forums

ERH+

Member
  • Posts

    859
  • Joined

  • Last visited

  • Days Won

    44

Posts posted by ERH+

  1. Modified lantern script:

    void playertools_helmet::init() {
    the_helmet = $null_entity;
    }
    void playertools_helmet::inventoryUse(entity userEntity, entity frobbedEntity, float buttonState)
    {
    if (the_helmet == $null_entity)
    {
     // No helmet so far, spawn it
     the_helmet = sys.spawn(getKey("def_lantern_light"));
    vector viewAngles = $player1.getViewAngles();
     vector origin = $player1.getEyePos();
    	   setJointPos(float jointnum, float transform_type, vector pos);
    /**
    * Attach an entity to the AI.
    * Entity spawnArgs checked for attachments are:
    *  - "origin", "angles", and "joint".
    * These must be set prior to calling attach.
    *
    * @attName: the desired name of the attachment, e.g., 'melee_weapon'
    */
     // Bind the helmet to the joint as defined in the entityDef file
     userEntity.attach(the_helmet, "light_source");
    
     // Set the icon to the "on" icon
     userEntity.changeInvIcon(getKey("inv_name"), getKey("inv_category"), getKey("inv_icon_on"));
    
    }
    else
    {
     // helmet is already active, remove it
     the_helmet.remove();
     the_helmet = $null_entity;
     // Set the icon to the "off" icon
     userEntity.changeInvIcon(getKey("inv_name"), getKey("inv_category"), getKey("inv_icon_off"));
    
    }
    }
    

     

     

     

    I have no idea what I'm doing... I want helmet model to be spawn in player eyes position, but don't know where to put origin and angle data.

    "def_lantern_light"? why this value is in def file?

    void playertools_helmet::init() {

    the_helmet = $null_entity;} -what is this? What it do?

  2. I decided to use lantern pattern for helmet but don't exactly know how to change it. Is there any FM using inventory item with button state value?

    Also I want to use a stim disable command, but looks like it does nothing:

     

    pattern:

    * @state: 0 = disabled, 1 = enabled

    */

    scriptEvent void StimEnable(float type, float state);

     

    my version:

    $player1.StimEnable( STIM_GAS, 0);

     

    (also STIM_WATER don't' work.)

  3. I have this piece of code for helmet overlay,

     

    1=$player1.createOverlay( "guis/helmet.gui", 100 );

    sys.wait(5);

    $player1.destroyOverlay(1);

     

    but it just cause "IdActor::SetAnimState: unknown anim group". What is wrong?

     

    Also I want a overlay transition to be made by zooming out from translucent centre of visor (so I can see a visor edge and helmet interior), then it should zoom in again. What GUI parameter will do this trick?

  4. Try the "heal" script event, which can be used on any entity.

    scriptEvent float heal(string healDefName, float healScale);
    

    giving it "breath_potion" as its first parameter.

     

    I've not tried it but this script event looks set up to do the same thing as the potions that can heal by using a healDef (def_heal). They are in tdm_healing.def. breath_potion is in there too and looks like the "normal" heals but gives 600 "air"

    I get errors with that line, how exactly should it look?
  5. So I want to make my diving helmet work as inexhaustible breathing potion. I could just make a potion with different model, but want to add some hud overlays etc. Breathing potion looks like health potion for secondary health bar, just with "def_heal" "breath_potion" arg ( I don't see any specific breath potion in tdm_player_tools.script). In "Script Events User-Friendly List" there is

    "float X = $<AIname/player1>.getHealth();" (returns AI/player health)

    "$<AI/player1>.setHealth(<health>);" (set AI/player health)

    but it generates an error at TDM start. So what command will restore breath bar?

  6. "Evilness" of chaos gods is relative, they are just about letting yourself be guided by impulses -Khorne for anger, Slaanesh for lust, Nurgle for hunger (as corrosion and pestilence is about consuming flesh and matter). RL religions are suppose to establish society rights over selfishness, they would try to suppress self development just to keep different people together. In Hindu caste system there is saying "if a leg want to become a head -it become a cancer", or in early societies, :"punish small offence hard, so there will be no big offences".

     

    But even Builder's order would need some April fool's day, where king become a beggar and vice versa, and people feast and wear/unwear masks, letting off steam.

  7. I have nodraw atdm:froblock, atdm:mover_lock_handle with model. On start both lock and lockhandle are not frobable, and handle is hidden. What I want to do, is to make an object to become visible, move like lock_handle, but be removed (or hidden) when lock is opened.

    But teleporting handle makes nothing happening, and attaching invisible func_static to handle makes BOTH handle and func_static invisible when func_static should be switched to visible. They turn visible if I use lockpick on them, but after I open lock, script not only remove func_static, but also a handle and any object binded to it. Help?

  8. Speaking only about colours... From one side, knights needed additional shirt over armour in sunny days to not boil up, and black armour would be acceptable only in some northern regions to catch up sun heat. From other side black armour is a sign of black knights, people who both follow strict moral codex and breake it by practising ways of witchcraft. He is a knight's equivalent of anti-priest. But I love Warhammer 40K and such over the top visage is just one step from it.

  9. So I have a repeatable trigger (player's character bed) and it should end several objectives by atdm:target_setobjective_state entities. But it looks like first frob on that trigger set ALL atdm:target_setobjective_state, even if assigned objectives are invisible AND need previous objectives to be fulfilled.

    It looks like objective state is stored in atdm:target_setobjective_state and only waits for its objective to pop up -then it fulfil it imminently.

    I could just put another atdm:target_addobjectives, but is there a way to make atdm:target_setobjective_state wait?

×
×
  • Create New...