Skip to content

Question about GetIsEncounterCreature();

I'm assuming that GetIsEncounterCreature(); simply checks for a variable set on all creatures that were spawned with the default encounter triggers. Does anyone know what this variable is? I want to add it to creatures spawned by my own supplemental spawn system.

Thanks in advance.

Comments

  • ForSeriousForSerious Member Posts: 466
    It might be a little less available than that. The best thing I can think of right now is to do a JSON dump on an encounter spawned creature, then see if you see something that looks like the flag you're looking for. If you haven't done it already, I'll take the time to do it tomorrow.
  • NeverwinterWightsNeverwinterWights Member Posts: 339
    ForSerious wrote: »
    It might be a little less available than that. The best thing I can think of right now is to do a JSON dump on an encounter spawned creature, then see if you see something that looks like the flag you're looking for. If you haven't done it already, I'll take the time to do it tomorrow.

    Good suggestion. Thank you. Sadly it doesn't look like it's going to be as simple as a variable. Nothing in the JsonDump VarTable seems to pertain to being an encounter creature.
  • 4BOLTMAIN4BOLTMAIN Member Posts: 90
    Maybe you have already thought of this but you could put your own variable on the creatures.

    I know it isn't the answer to your question but it would work.
  • NeverwinterWightsNeverwinterWights Member Posts: 339
    4BOLTMAIN wrote: »
    Maybe you have already thought of this but you could put your own variable on the creatures.

    I know it isn't the answer to your question but it would work.

    Yep. That was the plan if the encounter var thing didn't work out.
  • ForSeriousForSerious Member Posts: 466
    Yeah I'm not sure what to make of it.
    The creature from an encounter has this:
    "EncounterObject": {
          "type": "dword",
          "value": 1639
        }
    
    and the creature just placed in the toolset has this:
    "EncounterObject": {
          "type": "dword",
          "value": 2130706432
        }
    
    That '2130706432' might be a pointer to OBJECT_INVALID, where '1639' similarly points to the encounter object. You could manipulate your creature with JSON functions before creating it and see if that changes the return of GetIsEncounterCreature() to TRUE.

    I didn't see anything else that looked like it was related to encounters.
  • NeverwinterWightsNeverwinterWights Member Posts: 339
    ForSerious wrote: »
    Yeah I'm not sure what to make of it.
    The creature from an encounter has this:
    "EncounterObject": {
          "type": "dword",
          "value": 1639
        }
    
    and the creature just placed in the toolset has this:
    "EncounterObject": {
          "type": "dword",
          "value": 2130706432
        }
    
    That '2130706432' might be a pointer to OBJECT_INVALID, where '1639' similarly points to the encounter object. You could manipulate your creature with JSON functions before creating it and see if that changes the return of GetIsEncounterCreature() to TRUE.

    I didn't see anything else that looked like it was related to encounters.

    Ah interesting. Thank you for taking the time to look into that. Still trying to figure out the JSON stuff so this might be out of my current scope of capabilities.
Sign In or Register to comment.