• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

Get "Thold", "Quake" (and other variables) with onmodelscript?

Crimsondeath

Active member
Hi to everyone
I have read the OpenBOR manual. If I understand right, some values from the model header aren't posible to get using "getentityproperty" but there is another way to get it and use it in the onmodelscript? I need the follows to load in the weapons models:

Code:
thold 21
noquake 1
shadow 5
knockdowncount 15
paingrab 1
shadow 6

#Those values are from a regular entity header from my game

This is the onmodelcopy script, I'm using:
C++:
void modelCopy()
{//Maintain default header config for alternative models (WEAPON MODELS)
    void self         = getlocalvar("self");
    void old         = getlocalvar("old");

    int  iSpeed     = getentityproperty(old,"speed");
    int  iScore     = getentityproperty(old,"score");
    int  iAggre     = getentityproperty(old,"aggression");
    int  iMaxJuggle    = getentityproperty(old,"maxjugglepoints");
    int  iJuggle    = getentityproperty(old,"jugglepoints");
    int  iBounce    = getentityproperty(old,"bounce");
    int  iMprate     = getentityproperty(old,"mprate");
  
    /* ------ This is how I tried to get them xdddddd (didn't work)------ */
    int  iThold        = getentityproperty(old,"thold");
    int  iSleepwait = getentityproperty(old,"sleepwait");
    int  iHoldblock = getentityproperty(old,"holdblock");
    int  iKnockC    = getentityproperty(old,"knockdowncount");
    int  iBlockpain = getentityproperty(old,"blockpain");
    int  iQuake        = getentityproperty(old,"quake");
    int  iPainGrab    = getentityproperty(old,"paingrab");
    int  iShadow    = getentityproperty(old,"shadow");
    /* -----  0 ------ */

    int  iRunS        = getentityproperty(old,"running","speed");
    int  iRunY        = getentityproperty(old,"running","jumpy");
    int  iRunX        = getentityproperty(old,"running","jumpx");
    int  iRunL        = getentityproperty(old,"running","land");
    int  iRunM        = getentityproperty(old,"running","movez");
    int  iJumpS     = getentityproperty(old,"jumpspeed");
    int  iJumpH     = getentityproperty(old,"jumpheight");
    int  iStealth    = getentityproperty(old,"stealth");
    int  iDetect    = getentityproperty(old,"detect");
    int  iDefense     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL"));
    int  iDefense2     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL2"));
    int  iDefense3     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL3"));
    int  iDefense4     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL4"));
    int  iDefense5     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL5"));
    int  iDefense6     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL6"));
    int  iDefense7     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL7"));
    int  iDefense8     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL8"));
    int  iDefense9     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL9"));
    int  iDefense10     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL10"));
    int  iDefense11     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL11"));
    int  iDefense12     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL12"));
    int  iDefense13     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL13"));
    int  iDefense14     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL14"));
    int  iDefense15     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL15"));
    int  iDefense16    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL16"));
    int  iDefense17     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL17"));
    int  iDefense18    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL18"));
    int  iDefense19     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL19"));
    int  iDefense20    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL20"));
    int  iDefense21     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL21"));
    int  iDefense22    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL22"));
    int  iDefense23     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL23"));
    int  iDefense24    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL24"));
    int  iDefense25     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL25"));
    int  iDefense26    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL26"));
    int  iDefense27     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL27"));
    int  iDefense28    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL28"));
    int  iDefense29     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL29"));
    int  iDefense30    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL30"));
    int  iDefense31     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL31"));
    int  iDefense32    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL32"));
    int  iDefense33     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL33"));
    int  iDefense50    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL50"));
    int  iDefense51     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL51"));
    int  iDefense52     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL52"));
    int  iDefense60     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL60"));
    int  iDefense61     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL61"));
    int  iDefBurn     = getentityproperty(old,"defense", openborconstant("ATK_BURN"));
    int  iDefShock     = getentityproperty(old,"defense", openborconstant("ATK_SHOCK"));
    int  iDefLand     = getentityproperty(old,"defense", openborconstant("ATK_LAND"));

    changeentityproperty(self, "speed", iSpeed);
    changeentityproperty(self, "score", iScore);
    changeentityproperty(self, "aggression", iAggre);
    changeentityproperty(self, "maxjugglepoints", iMaxJuggle);
    changeentityproperty(self, "jugglepoints", iJuggle);
    changeentityproperty(self, "bounce", iBounce);
    changeentityproperty(self, "mpset", NULL(), NULL(), NULL(), iMprate, NULL(), NULL());

    /* ------ And this is how I tried to change them x'd (didn't work either)------ */
    changeentityproperty(self, "thold", iThold);
    changeentityproperty(self, "holdblock", iHoldblock);
    changeentityproperty(self, "knockdowncount", iKnockC);
    changeentityproperty(self, "blockpain", iBlockpain);
    changeentityproperty(self, "sleepwait", iSleepwait);
    changeentityproperty(self, "quake", iQuake);
    changeentityproperty(self, "paingrab", iPainGrab);
    changeentityproperty(self, "shadow", iShadow);
    /* -----  0 ------ */


    changeentityproperty(self, "running", iRunS, iRunY, iRunX, iRunL, iRunM);
    changeentityproperty(self, "jumpspeed", iJumpS);
    changeentityproperty(self, "jumpheight", iJumpH);
    changeentityproperty(self, "stealth", iStealth);
    changeentityproperty(self, "detect", iDetect);

    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL"), iDefense);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL2"), iDefense2);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL3"), iDefense3);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL4"), iDefense4);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL5"), iDefense5);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL6"), iDefense6);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL7"), iDefense7);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL8"), iDefense8);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL9"), iDefense9);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL10"), iDefense10);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL11"), iDefense11);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL12"), iDefense12);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL13"), iDefense13);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL14"), iDefense14);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL15"), iDefense15);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL16"), iDefense16);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL17"), iDefense17);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL18"), iDefense18);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL19"), iDefense19);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL20"), iDefense20);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL21"), iDefense21);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL22"), iDefense22);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL23"), iDefense23);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL24"), iDefense24);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL25"), iDefense25);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL26"), iDefense26);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL27"), iDefense27);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL28"), iDefense28);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL29"), iDefense29);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL30"), iDefense30);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL31"), iDefense31);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL32"), iDefense32);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL33"), iDefense33);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL50"), iDefense50);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL51"), iDefense51);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL52"), iDefense52);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL60"), iDefense60);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL61"), iDefense61);
    changeentityproperty(self, "defense", openborconstant("ATK_BURN"), iDefBurn);
    changeentityproperty(self, "defense", openborconstant("ATK_SHOCK"), iDefShock);
    changeentityproperty(self, "defense", openborconstant("ATK_LAND"), iDefLand);
}

The OpenBOR version I'm using is the v3.0 Build (Compile Date: May 12 2023)

Thanks :D

EDIT: Is there a way to get the freespecial commands too?

There values from entity header:

Code:
com U U A freespecial2
com D D A freespecial3
com a4 freespecial5
com a2 freespecial4
com U D A freespecial
com D U A freespecial
 
Last edited:
Hi to everyone
I have read the OpenBOR manual. If I understand right, some values from the model header aren't posible to get using "getentityproperty" but there is another way to get it and use it in the onmodelscript? I need the follows to load in the weapons models:

Code:
thold 21
noquake 1
shadow 5
knockdowncount 15
paingrab 1
shadow 6

#Those values are from a regular entity header from my game

This is the onmodelcopy script, I'm using:
C++:
void modelCopy()
{//Maintain default header config for alternative models (WEAPON MODELS)
    void self         = getlocalvar("self");
    void old         = getlocalvar("old");

    int  iSpeed     = getentityproperty(old,"speed");
    int  iScore     = getentityproperty(old,"score");
    int  iAggre     = getentityproperty(old,"aggression");
    int  iMaxJuggle    = getentityproperty(old,"maxjugglepoints");
    int  iJuggle    = getentityproperty(old,"jugglepoints");
    int  iBounce    = getentityproperty(old,"bounce");
    int  iMprate     = getentityproperty(old,"mprate");
 
    /* ------ This is how I tried to get them xdddddd (didn't work)------ */
    int  iThold        = getentityproperty(old,"thold");
    int  iSleepwait = getentityproperty(old,"sleepwait");
    int  iHoldblock = getentityproperty(old,"holdblock");
    int  iKnockC    = getentityproperty(old,"knockdowncount");
    int  iBlockpain = getentityproperty(old,"blockpain");
    int  iQuake        = getentityproperty(old,"quake");
    int  iPainGrab    = getentityproperty(old,"paingrab");
    int  iShadow    = getentityproperty(old,"shadow");
    /* -----  0 ------ */

    int  iRunS        = getentityproperty(old,"running","speed");
    int  iRunY        = getentityproperty(old,"running","jumpy");
    int  iRunX        = getentityproperty(old,"running","jumpx");
    int  iRunL        = getentityproperty(old,"running","land");
    int  iRunM        = getentityproperty(old,"running","movez");
    int  iJumpS     = getentityproperty(old,"jumpspeed");
    int  iJumpH     = getentityproperty(old,"jumpheight");
    int  iStealth    = getentityproperty(old,"stealth");
    int  iDetect    = getentityproperty(old,"detect");
    int  iDefense     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL"));
    int  iDefense2     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL2"));
    int  iDefense3     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL3"));
    int  iDefense4     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL4"));
    int  iDefense5     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL5"));
    int  iDefense6     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL6"));
    int  iDefense7     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL7"));
    int  iDefense8     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL8"));
    int  iDefense9     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL9"));
    int  iDefense10     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL10"));
    int  iDefense11     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL11"));
    int  iDefense12     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL12"));
    int  iDefense13     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL13"));
    int  iDefense14     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL14"));
    int  iDefense15     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL15"));
    int  iDefense16    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL16"));
    int  iDefense17     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL17"));
    int  iDefense18    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL18"));
    int  iDefense19     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL19"));
    int  iDefense20    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL20"));
    int  iDefense21     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL21"));
    int  iDefense22    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL22"));
    int  iDefense23     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL23"));
    int  iDefense24    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL24"));
    int  iDefense25     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL25"));
    int  iDefense26    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL26"));
    int  iDefense27     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL27"));
    int  iDefense28    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL28"));
    int  iDefense29     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL29"));
    int  iDefense30    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL30"));
    int  iDefense31     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL31"));
    int  iDefense32    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL32"));
    int  iDefense33     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL33"));
    int  iDefense50    = getentityproperty(old,"defense", openborconstant("ATK_NORMAL50"));
    int  iDefense51     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL51"));
    int  iDefense52     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL52"));
    int  iDefense60     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL60"));
    int  iDefense61     = getentityproperty(old,"defense", openborconstant("ATK_NORMAL61"));
    int  iDefBurn     = getentityproperty(old,"defense", openborconstant("ATK_BURN"));
    int  iDefShock     = getentityproperty(old,"defense", openborconstant("ATK_SHOCK"));
    int  iDefLand     = getentityproperty(old,"defense", openborconstant("ATK_LAND"));

    changeentityproperty(self, "speed", iSpeed);
    changeentityproperty(self, "score", iScore);
    changeentityproperty(self, "aggression", iAggre);
    changeentityproperty(self, "maxjugglepoints", iMaxJuggle);
    changeentityproperty(self, "jugglepoints", iJuggle);
    changeentityproperty(self, "bounce", iBounce);
    changeentityproperty(self, "mpset", NULL(), NULL(), NULL(), iMprate, NULL(), NULL());

    /* ------ And this is how I tried to change them x'd (didn't work either)------ */
    changeentityproperty(self, "thold", iThold);
    changeentityproperty(self, "holdblock", iHoldblock);
    changeentityproperty(self, "knockdowncount", iKnockC);
    changeentityproperty(self, "blockpain", iBlockpain);
    changeentityproperty(self, "sleepwait", iSleepwait);
    changeentityproperty(self, "quake", iQuake);
    changeentityproperty(self, "paingrab", iPainGrab);
    changeentityproperty(self, "shadow", iShadow);
    /* -----  0 ------ */


    changeentityproperty(self, "running", iRunS, iRunY, iRunX, iRunL, iRunM);
    changeentityproperty(self, "jumpspeed", iJumpS);
    changeentityproperty(self, "jumpheight", iJumpH);
    changeentityproperty(self, "stealth", iStealth);
    changeentityproperty(self, "detect", iDetect);

    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL"), iDefense);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL2"), iDefense2);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL3"), iDefense3);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL4"), iDefense4);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL5"), iDefense5);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL6"), iDefense6);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL7"), iDefense7);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL8"), iDefense8);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL9"), iDefense9);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL10"), iDefense10);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL11"), iDefense11);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL12"), iDefense12);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL13"), iDefense13);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL14"), iDefense14);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL15"), iDefense15);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL16"), iDefense16);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL17"), iDefense17);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL18"), iDefense18);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL19"), iDefense19);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL20"), iDefense20);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL21"), iDefense21);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL22"), iDefense22);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL23"), iDefense23);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL24"), iDefense24);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL25"), iDefense25);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL26"), iDefense26);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL27"), iDefense27);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL28"), iDefense28);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL29"), iDefense29);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL30"), iDefense30);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL31"), iDefense31);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL32"), iDefense32);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL33"), iDefense33);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL50"), iDefense50);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL51"), iDefense51);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL52"), iDefense52);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL60"), iDefense60);
    changeentityproperty(self, "defense", openborconstant("ATK_NORMAL61"), iDefense61);
    changeentityproperty(self, "defense", openborconstant("ATK_BURN"), iDefBurn);
    changeentityproperty(self, "defense", openborconstant("ATK_SHOCK"), iDefShock);
    changeentityproperty(self, "defense", openborconstant("ATK_LAND"), iDefLand);
}

The OpenBOR version I'm using is the v3.0 Build (Compile Date: May 12 2023)

Thanks :D

EDIT: Is there a way to get the freespecial commands too?

There values from entity header:

Code:
com U U A freespecial2
com D D A freespecial3
com a4 freespecial5
com a2 freespecial4
com U D A freespecial
com D U A freespecial


I don't recall the legacy method to get those model properties. IIRC, most of them are exposed as entity properties (and that's part of what 4.0 does - eliminate confusion like that). I can tell you 100% there is no way at all to get command sequences in 3.0. It you want to keep track of command input setups, you'll need to handle them with script from the start.

DC
 
I don't recall the legacy method to get those model properties. IIRC, most of them are exposed as entity properties (and that's part of what 4.0 does - eliminate confusion like that). I can tell you 100% there is no way at all to get command sequences in 3.0. It you want to keep track of command input setups, you'll need to handle them with script from the start.

DC

Oh well, thanks anyway DC Current(y)
 
Back
Top Bottom