Home   Help Search Login Register  

Author Topic: Hide source  (Read 1918 times)

0 Members and 1 Guest are viewing this topic.

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Hide source
« on: 31 Dec 2009, 15:13:52 »

 I am having trouble with a hidden section in one of my buildings,
 I seem to recall in ofp we could start an animation either  0 or 1  , but i can for the life of me remember if it used a User source workaround  or it was possible in Bis code.

 basicly i want a piece hidden and then to unhide it.


  minValue = 0;
  maxValue = 1;
  Minphase =0;
  Maxphase = 1;

  i know with roatations we can do  Angle0 Angle1  but i thought there was a similar command with the min max of translations .

 i could always do user  initphase 1 in the cpp but i want to avoid user scripting bollox if i can.

 anyway cheers for any ideas

DB


I love ofp

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re: Hide source
« Reply #1 on: 01 Jan 2010, 04:57:54 »
From memory I couldn't get the "initPhase=1;" to work in the Model.cfg
But then again I didn't try too hard to solve that mystery and simply just use a script in the INIT EH to hide the section before/as the addon appeared.

All I can say is you would expect initPhase to work ....... but there could of course be a bug.

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Hide source
« Reply #2 on: 01 Jan 2010, 20:56:48 »

 Aye its a bummer , i cant believe Bis are allowing all there wall sections to be unhidden and hiding on impact , it just seems so backwards , i know there a bit Heath robinson at times, but i think there using texture and hiding geo lods  there no other way i can find and i have even been in the hex editor.

 I guess i will have to use Eh but the way bloody Hit work i will have to use dammage and the big problem with that is , bullet hits or more over launcher hits have a hit radius and it doeesnt take into account that  if it hits a wall , it should not pass the damage  through 8 meters , even if i create a hitpoint and put passthrough 0 , the bloody hit radius will over ride it and blow everything out lol.

 Looks like a Big job ahead.



 
I love ofp

Offline ModestNovice

  • Members
  • *
Re: Hide source
« Reply #3 on: 03 Jan 2010, 18:56:52 »
I didn't think InitPhase went in the CfgModels?

My hide anim looked like this:
config.cpp
Code: [Select]
class CfgModels
{
class Animations
{
class lightbarAnim
{
type = "hide";
source = "quick_anim";
selection = "lightBarSwitch";
};
};
};

class CfgVehicles
{
class AnimationSources
{
class quick_anim
{
source = "user";
animPeriod = 0;
initPhase = 0; //Unhidden at start
};
};
};

So upon splitting into config.cpp and model.cfg, wouldn't only the animation go in the model.cfg, and the animationSource (with initPhase) go in your config.cpp?

Maybe this helps some Deanos?
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Hide source
« Reply #4 on: 04 Jan 2010, 19:03:21 »


It does  but the problem i have is that i want it to be hidden at

animationphase = 0
and unhidden at
animationphase = 1

 this is because i want the full wall for example

 fulwall {

 source "damage"
blah
}

holewall
{
source "fullwall"

blah};

 this way i need the second wall to be opposite of the first .
 anyway i have decided to use the EH workaround for now, if i call it rather than execvm it is a nice quick transition  .

  any  direct engine source ideas always welcome though



 
I love ofp