|
-
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
-
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.
-
-
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
-
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.
-
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*
};
-
No, _zCVob_lightColorDyn is not the equivalent of cDyn, the mover remains crossable
-
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.
-
Zitat von Milky-Way
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
-
-
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
|
|