func_door scripting ?


(Drakir) #1

I have a problem. I want to use a func door as a trigger in my map. It works great, just that i need the trigger to dissapear untill a certain moment when i call for it in the script.

So i set up a simple script that set the state to invisible for that scriptname entity. But when i test the map i get an error saying that there is no entity to set the state on? Bah… :banghead:

Can it be because doors are compiled into the map and there for cannot be called upon via script?

Had the same problem with some models, seems like misc_models cannot either be called upon as they are compiled into the map. misc_gamemodels works fine though.


(sock) #2

Are you doing the setstate in the spawn section of the script? if so you will need a pause of say “wait 50” so the entity is setup correctly. When the map is started up not all entities are ready at once and can take 1 frame (wait 50) to initialize.

Sock
:moo:


(Drakir) #3

ok, tnx!