Aller au contenu

Photo

ScriptHidden and encounter spawned creatures


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

#1
kamal_

kamal_
  • Members
  • 5 254 messages

I want to have an encounter spawn in that spawns in scripthidden creatures. This works, my test script puts out the debug message that the creature is valid and tells me the correct tag of the creature. However, when I go to turn scripthidden off (in a conversation with an npc), the scripthidden creature does not appear. To test, I made changed the blueprint of the creature so it would not be scripthidden (the encounter created it correctly, and when I tried turning this creature scripthidden, it did not go hidden.

 

Tldr version: Apparently creatures spawned in via encounter can't have their scripthidden property changed. Can someone confirm?

 

Alternately, how do I launch an encounter from a conversation?



#2
4760

4760
  • Members
  • 1 212 messages
Is there any reason why you wouldn't set the creatures in the encounter with the ScriptHidden flag set to True, and change it during the conversation? It works as expected for me.
I know, the drawback is you can't change the blueprint afterwards without changing all the monsters in the encounter.

I'll check if the property of creatures spawned can be changed later (not with the computer right now)

#3
kamal_

kamal_
  • Members
  • 5 254 messages

Is there any reason why you wouldn't set the creatures in the encounter with the ScriptHidden flag set to True, and change it during the conversation? It works as expected for me.

That's what I tried to do, without success. I want to use an encounter rather than placed creatures so I can give the player something level appropriate.



#4
andysks

andysks
  • Members
  • 1 651 messages

 

Alternately, how do I launch an encounter from a conversation?

Bealzebub gave me this a while back, given to him by Knightmare. Works like a charm.

// ga_trigger_encounter
// By Knightmare - Nov. 13, 2009
// Enter the Tag of the encounter trigger for sEncounterTag

void main(string sEncounterTag)
{
object oPC = GetPCSpeaker();
object oEncounter = GetNearestObjectByTag(sEncounterTag, oPC, 1);
SetEncounterActive(TRUE, oEncounter);
TriggerEncounter(oEncounter, oPC, ENCOUNTER_CALC_FROM_FACTION, -1.0);
}

 


  • rjshae, kamal_ et 4760 aiment ceci

#5
kamal_

kamal_
  • Members
  • 5 254 messages

 

Bealzebub gave me this a while back, given to him by Knightmare. Works like a charm.

// ga_trigger_encounter
// By Knightmare - Nov. 13, 2009
// Enter the Tag of the encounter trigger for sEncounterTag

void main(string sEncounterTag)
{
object oPC = GetPCSpeaker();
object oEncounter = GetNearestObjectByTag(sEncounterTag, oPC, 1);
SetEncounterActive(TRUE, oEncounter);
TriggerEncounter(oEncounter, oPC, ENCOUNTER_CALC_FROM_FACTION, -1.0);
}

Winner! And this was my preferred method of handling things in the first place.



#6
Dann-J

Dann-J
  • Members
  • 3 161 messages

Ginc_group contains a function called GroupSetScriptHidden().

 

When I spawn encounters, I like to use EncounterToGroup() to put them all into a unique group. Then I've got all sorts of nifty functions in ginc_group that allow me to do things to them en masse if need be.