You only have to do that (if I've good understood you problem ;) ) :

CFuncTest* pTest = (CFuncTest*)CBaseEntity::Instance(pEdict);.
Then, you can use pTest as a CFuncTest.

     - Cortex : HL Albator coder and mapper ( www.hlalbator.fr.st )
     - email : [EMAIL PROTECTED]  &  ICQ : 71548738

Vyacheslav Djura <[EMAIL PROTECTED]> nous disait :

> Hello coders!
>
>   I need to print property of entity which is in front of us, but
>   that property is a property of my class CFuncTest and before I print
>   this value (m_iKind) I am checking if entity was func_test. Then I
>   do the following:
>
>   CFuncTest *pTest;
>   pTest =  CFuncTest::Instance(pEdict); //found entity is edict
>   ALERT( at_console, "Kind is %d\n", pTest->m_iKind);
>
>   but that doesn't - it always returns zero (though value is set to 1
>   or other except zero). I guess that is because instance will always
> return   CBaseEntity properties only. I tried
>
>   pTest = (*CFuncTest)Instance(pEdict)
>
>   but result is the same. In Delphi that could be done by pTest :=
>   (pEntity as CFuncTest), but how can I do that in C++???
>   I'll be glad if someone will help me with that :)
>
>   thanks.
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to