Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Ergebnis 1 bis 11 von 11
  1. Beiträge anzeigen #1 Zitieren
    Veteran
    Registriert seit
    Jan 2012
    Beiträge
    681
     
    Frank-95 ist offline

    Trigger reacts on damage

    Hi all

    Can you remember the open space in jharkendar where you can find the magic bow? Well if so, you will surely remember also that it's possible to arrive there but not to leave. I found (quite randomly really), the a tree there around is not simply a vob but a mover istead. In fact piranha bytes had programmed an animation for the tree. And they also placed a trigger script for triggerring it, but the problem is that they aren't link and I found no way to active the trigger.

    Then, I tried to create another trigger to move the tree. I placed a zCTrigger just next the the tree. I set cDyn to TRUE, reactondamage to TRUE and damagetreshold to 1. But I still cannot simulate the damage like in the hidden bridge in irdorath. I remember that in irdorath if you aimed you could see the aim fixed in one place, but I cannot reproduce this.

    Do you know, by any chance, if the aim is triggere by the zCTrigger directly, or by the ZCMobSwitch behind it? (I'm talking about the triggers in jharkendar)

    My goal is to make the tree fall (it's already a mover with animation) by hitting it.

    Thanks

  2. Beiträge anzeigen #2 Zitieren
    Legend of Ahssûn Avatar von TheEternal
    Registriert seit
    Jun 2013
    Ort
    Frankfurt
    Beiträge
    4.546
     
    TheEternal ist offline
    i guess u have to enlarge the boundingbox(Area of hit) of the zCtrigger and set "reacttoObject: true" & "reactonTouch: TRUE". Which is kinda obvious, when u think about it. Plus, u have to place a MobInter behind the trigger, so that u can aim at something. Maybe the Mobinter is not necessary for triggering with a sword.
    By the way, u can open the Irdorath ZEN and look at how its implemented there. It's most probably a trigger with boundingbox, which triggers the switch.
    [Bild: LoA_Banner_Skyline2.jpg]
    LoA Website
    Checkout Cloudevo: unlimited Cloud-Drive


  3. Beiträge anzeigen #3 Zitieren
    Veteran
    Registriert seit
    Jan 2012
    Beiträge
    681
     
    Frank-95 ist offline
    Thank you, by increasing the bounding box I managed to active the trigger

    I found that there is another problem though. If I trigger the mover in the spacer it moves correctly, but in game it stops halfway. I tried to set cDDyn to false, and it went all the way down. So it seems that there is some collisions to stop it. Vobs around it have all cdDyn set to false.

    I think that it's caused by the huge bounding box of the tree that collides with the ruins up there during the movement. But I don't why, I cannot adjust the sides of the box. They return to their original dimension

    What do you think?

  4. Beiträge anzeigen #4 Zitieren
    Legend of Ahssûn Avatar von TheEternal
    Registriert seit
    Jun 2013
    Ort
    Frankfurt
    Beiträge
    4.546
     
    TheEternal ist offline
    the boundingbox of the tree is defined by the 3d model of tree. u can turn cdDyn off and use a smaller vob with smaller boundingbox + set the showVisual attribute of the smaller vod zu false + cdDyn: true
    [Bild: LoA_Banner_Skyline2.jpg]
    LoA Website
    Checkout Cloudevo: unlimited Cloud-Drive


  5. Beiträge anzeigen #5 Zitieren
    now also in your universe  Avatar von Milky-Way
    Registriert seit
    Jun 2007
    Beiträge
    15.244
     
    Milky-Way ist offline
    Alternatively, you could try to call a function just before starting the mover, and use Ikarus to set cdDyn to false. Once the mover is done, set it back to true, so you can actually walk across.

  6. Beiträge anzeigen #6 Zitieren
    Veteran
    Registriert seit
    Jan 2012
    Beiträge
    681
     
    Frank-95 ist offline
    Code:
    var int VALLEY_SHOWCASE_TRIGGERSCRIPT_FUNC_OneTime;
    
    func void valley_showcase_triggerscript_func()
    {
        if(VALLEY_SHOWCASE_TRIGGERSCRIPT_FUNC_OneTime == FALSE)
        {
            B_GivePlayerXP(XP_Addon_WackelBaum);
            VALLEY_SHOWCASE_TRIGGERSCRIPT_FUNC_OneTime = TRUE;
        };
    
        FF_ApplyOnceExt(valley_showcase_posttrigger, 2500, 1);
    };
    
    func void valley_showcase_posttrigger()
    {
        var zCMover ValleyTree;
        ValleyTree = _^(MEM_SearchVobByName("VALLEY_SHOWCASE_TRIGGERSCRIPT"));
        ValleyTree.???
    };
    Which is the equivalent of cDyn in zCVob?

    Code:
    class zCVob
    {
    //zCObject {
      var int    _vtbl;
      var int    _zCObject_refCtr;
      var int    _zCObject_hashIndex;
      var int    _zCObject_hashNext;
      var string _zCObject_objectName;
    //}
      var int    globalVobTreeNode;         // 0x0024 zCTree<zCVob>*
      var int    lastTimeDrawn;             // 0x0028 zTFrameCtr
      var int    lastTimeCollected;         // 0x002C zDWORD
    //zCArray<zCBspLeaf*> {
      var int    vobLeafList_array;         // 0x0030 zCBspLeaf**
      var int    vobLeafList_numAlloc;      // 0x0034 int
      var int    vobLeafList_numInArray;    // 0x0038 int
    //}
      var int    trafoObjToWorld[16];       // 0x003C zMATRIX4
    //zTBBox3D {
      var int    bbox3D_mins[3];            // 0x007C zPOINT3
      var int    bbox3D_maxs[3];            // 0x0088 zPOINT3
    //}
    //zTBSphere3D {
      var int    bsphere3D_center[3];       // 0x0094 zPOINT3
      var int    bsphere3D_radius;          // 0x00A0 zVALUE
    //}
    //zCArray<zCVob*> {
      var int    touchVobList_array;        // 0x00A4 zCVob**
      var int    touchVobList_numAlloc;     // 0x00A8 int
      var int    touchVobList_numInArray;   // 0x00AC int
    //}
      var int    type;                      // 0x00B0 zTVobType
      var int    groundShadowSizePacked;    // 0x00B4 zDWORD
      var int    homeWorld;                 // 0x00B8 zCWorld*
      var int    groundPoly;                // 0x00BC zCPolygon*
      var int    callback_ai;               // 0x00C0 zCAIBase*
      var int    trafo;                     // 0x00C4 zMATRIX4*
      var int    visual;                    // 0x00C8 zCVisual*
      var int    visualAlpha;               // 0x00CC zREAL
      var int    m_fVobFarClipZScale;       // 0x00D0 zREAL
      var int    m_AniMode;                 // 0x00D4 zTAnimationMode
      var int    m_aniModeStrength;         // 0x00D8 zREAL
      var int    m_zBias;                   // 0x00DC int
      var int    rigidBody;                 // 0x00E0 zCRigidBody*  //this is cdstatic
      var int    lightColorStat;            // 0x00E4 zCOLOR        
      var int    lightColorDyn;             // 0x00E8 zCOLOR      //this is the only similar name I see, but I don't think sincerely
      var int    lightDirectionStat[3];     // 0x00EC zVEC3
      var int    vobPresetName;             // 0x00F8 zSTRING*
      var int    eventManager;              // 0x00FC zCEventManager*
      var int    nextOnTimer;               // 0x0100 zREAL
      var int    bitfield[5];               // 0x0104 zCVob_bitfieldX_Xxx
      var int    m_poCollisionObjectClass;  // 0x0118 zCCollisionObjectDef*
      var int    m_poCollisionObject;       // 0x011C zCCollisionObject*
    };

  7. Beiträge anzeigen #7 Zitieren
    Veteran
    Registriert seit
    Jan 2012
    Beiträge
    681
     
    Frank-95 ist offline
    No, _zCVob_lightColorDyn is not the equivalent of cDyn, the mover remains crossable

  8. Beiträge anzeigen #8 Zitieren
    now also in your universe  Avatar von Milky-Way
    Registriert seit
    Jun 2007
    Beiträge
    15.244
     
    Milky-Way ist offline
    I never tried to do that with Ikarus, but looking at the things you are given, I assume it is in one of the last 3 fields.
    Code:
      var int    bitfield[5];               // 0x0104 zCVob_bitfieldX_Xxx
      var int    m_poCollisionObjectClass;  // 0x0118 zCCollisionObjectDef*
      var int    m_poCollisionObject;       // 0x011C zCCollisionObject*
    Maybe there is some documentation for it somewhere. (search forum and scripts for variable names and the object type mentioned in the comment)
    If there is no documentation, you might have to either wait until someone comes by who knows, or you just try to output the values of those variables in a small test world for two vobs, exactly one of which has no dynamic collision and all other settings (except maybe position) are the same.

  9. Beiträge anzeigen #9 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.447
     
    Lehona ist offline
    Zitat Zitat von Milky-Way Beitrag anzeigen
    I never tried to do that with Ikarus, but looking at the things you are given, I assume it is in one of the last 3 fields.
    Code:
      var int    bitfield[5];               // 0x0104 zCVob_bitfieldX_Xxx
      var int    m_poCollisionObjectClass;  // 0x0118 zCCollisionObjectDef*
      var int    m_poCollisionObject;       // 0x011C zCCollisionObject*
    Maybe there is some documentation for it somewhere. (search forum and scripts for variable names and the object type mentioned in the comment)
    If there is no documentation, you might have to either wait until someone comes by who knows, or you just try to output the values of those variables in a small test world for two vobs, exactly one of which has no dynamic collision and all other settings (except maybe position) are the same.
    But you literally just explained it in the Ikarus-Thread

    Try this:

    Code:
    myVob.bitfield[0] = myVob.bitfield[0] | zCVob_bitfield0_collDetectionDynamic; //add dynamic collision
    myVob.bitfield[0] = myVob.bitfield[0] & ~ zCVob_bitfield0_collDetectionDynamic; //remove dynamic collision

  10. Beiträge anzeigen #10 Zitieren
    now also in your universe  Avatar von Milky-Way
    Registriert seit
    Jun 2007
    Beiträge
    15.244
     
    Milky-Way ist offline
    Zitat Zitat von Lehona Beitrag anzeigen
    But you literally just explained it in the Ikarus-Thread
    Yes, because he looked it up and I only had to translate
    (i.e. I felt it wasn't my task to do the searching)

    But good to have the solution here as well so people using the search function can find it.

    And to add some value to my post, here is a link to the Ikarus thread with brief explanation:
    http://forum.worldofplayers.de/forum...1#post24070812

  11. Beiträge anzeigen #11 Zitieren
    Veteran
    Registriert seit
    Jan 2012
    Beiträge
    681
     
    Frank-95 ist offline
    Thanks to you both for your answers

    I needed to know what to search for

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide