Jump to content


Photo

How to trigger visibility of model?


7 replies to this topic

#1 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36759 posts

Posted 26 December 2017 - 08:26 PM

I feel like this should be pretty straightforward, and I'm pretty sure I've even explained how to do it to someone else a while ago, but for the life of me I can't remember or find the method for doing so:

 

I have a model that is essentially an electrical effect.  I'd like to trigger its visibility on and off.  I thought we used to have a func_hide, but I can't find one.  Anyone remember how you trigger something to hide?



#2 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8214 posts

Posted 26 December 2017 - 08:42 PM

Pretty sure:
 
"hide" "n"
 
(where "n" is either 0 or 1) can control that.
 
The only wiki entry has the hide script reference:
 
scriptEvent void hide();


Makes this entity invisible.


Spawnclasses responding to this event: idEntity


http://wiki.thedarkm..._Reference/2.03
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#3 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36759 posts

Posted 26 December 2017 - 09:12 PM

The DR description for func_static says:

 

"A brush model that just sits there, doing nothing.  Can be used for conditional walls and models.
When triggered, toggles between visible and hidden (see hide).  Entity is non-solid when hidden."

 

Is it confirmed that this doesn't actually work?  It didn't for me.



#4 NeonsStyle

NeonsStyle

    Advanced Member

  • Member
  • PipPipPip
  • 1292 posts

Posted 26 December 2017 - 10:47 PM

<delete me>


Edited by NeonsStyle, 26 December 2017 - 10:47 PM.

I have a small YouTube channel making videos on a variety of games. Come and have look here:
 
https://www.youtube.com/c/NeonsStyleHD

 

Briarwood Manor - available here or in game

http://forums.thedar...2017-update-16/

 

 

 


#5 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36759 posts

Posted 27 December 2017 - 01:56 PM

"A brush model that just sits there, doing nothing.  Can be used for conditional walls and models.
When triggered, toggles between visible and hidden (see hide).  Entity is non-solid when hidden."

 

 

For future reference, this DOES work, but only if you manually add "hide" "0" to the func_static in question (thanks to Spooks for the info).


  • Abusimplea likes this

#6 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 590 posts

Posted 28 December 2017 - 06:42 PM

If you don't want to use a func_static or a spawnarg for that you can also make a script object for your effect and just call the methods hide() and show(), is overkill for such a simple thing but is a option. 

 

self.hide();

 

self.show();



#7 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5375 posts

Posted 29 December 2017 - 03:06 AM

You don't need a scriptobject for that, func_statics already make use of the hide and show function. A target_callobjectfunction should do the trick here.

 

 

For future reference, this DOES work, but only if you manually add "hide" "0" to the func_static in question (thanks to Spooks for the info).

This sounds like a bug to me.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 590 posts

Posted 29 December 2017 - 08:14 AM

You don't need a scriptobject for that, func_statics already make use of the hide and show function. A target_callobjectfunction should do the trick here.

 

Perhaps i explained me wrong I didn't said to use a scriptObject for func_statics, i said that a scriptObject is also a option to hide or show objects, a option among others. 





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users