Aller au contenu

Photo

Will this work on script hidden creatures?


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 645 messages

Hi all. I need to ask this, so that I don't meet any surprises. I have some creatures, script hidden. In a conversation, I want to make them a group, then reveal them. Will the scripts recognize them while they are hidden, in order to be added to the group, or not?

 

If not, will it be better to reveal them all as individuals and not with the GroupSetScriptHidden, and then add them once they are not hidden?

 

Thanks :).



#2
kevL

kevL
  • Members
  • 4 056 messages
should be ok.

scripthidden creatures are still well-formed objects in the underlying engine. That is, if you want to add/manipulate variables on them go ahead. I can't give a precise defn' for what scripthidden means, but my guess is that hardcode for things like checking lines-of-sight, take-damage, etc has clauses that bypass scripthidden targets.

in my experience, SH creatures can be more substantial than expected; when scripting up custom game mechanics they might get affected unless accounted for. always best to test,

#3
andysks

andysks
  • Members
  • 1 645 messages

Ah that's good. I thought so because there's only an option to disable the AI on SH creatures. There was no indication that they are not well-formed in any manner.



#4
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

They're still game objects in the usual sense of the word, but you might have trouble "finding" them using a script, since they won't show up in scripts like "GetFirstObjectInShape".



#5
andysks

andysks
  • Members
  • 1 645 messages

Yes but adding them to a group by their tags should be fine right? That's the one I want to use. Just so that I then use GroupSetScriptHidden, and some other group functions. But the rest is irrelevant since they are no more hidden.



#6
kevL

kevL
  • Members
  • 4 056 messages
i'm seeing getters like

GetNearestObjectByTag()
GetFirstObjectInArea()
GetObjectByTag()

in 'ginc_group'

and to keep track of things, Global_vars like
Get/Set/DeleteGlobalObject/Int/Float

so I still think it's okay - bypassing GetFirstObjectInShape() conveniently bypasses ~% spellscripts.
careful there may be others ...

#7
Dann-J

Dann-J
  • Members
  • 3 161 messages

should be ok.

scripthidden creatures are still well-formed objects in the underlying engine. That is, if you want to add/manipulate variables on them go ahead. I can't give a precise defn' for what scripthidden means, but my guess is that hardcode for things like checking lines-of-sight, take-damage, etc has clauses that bypass scripthidden targets.

in my experience, SH creatures can be more substantial than expected; when scripting up custom game mechanics they might get affected unless accounted for. always best to test,

 

Script-hidden creatures can be *too* substantial at times, in that you have to account for them in certain scripts. I think the standard GA_ script that checks for hostiles within a certain distance doesn't account for them, which means any conversation that uses it to see if it's safe to rest will report a hostile in range when it really shouldn't.

 

If you want script-hidden creatures to be in a specific group, you can give them an OnSpawn script that adds them in when the game starts. I use a generic script that checks for a specific local string variable, using that string as their group name.