Jump to content

Trying to receive getdead info, but script doesn't change stage when specified actors are dead


JuicyPwner

Recommended Posts

Hi I'm trying to detect if npcs selected via quest are dead to move on to the next stage, however for some reason it doesnt change, here is my script:

 

scn garrisonambushstage30
begin gamemode
if getstage vangraffcrimsoncollab == 20
if getdead GarrisonVanGraff1== 1 && getdead GarrisonVanGraff2== 1 && getdead GarrisonVanGraff3== 1 && getdead GarrisonVanGraff4== 1 && getdead GarrisonVanGraff5a== 1
setstage vangraffcrimsoncollab 30
endif
endif
end
5a is on purpose., and as for the quest itself, they have REFs targetted towards them, however I have the above script that should detect if npc is dead (==1) and if all are dead proceed to next stage but it is not working. Is there a different way I should be approaching this?
Link to comment
Share on other sites

Ok, so i dont know whats up with the above script, i got around with a different script though its not as fulfilling as I'd hoped.

 

scn garrisonambushstage30
begin ondeath
if getstage vangraffcrimsoncollab==20
setstage vangraffcrimsoncollab 30
endif
end
with an associated NPC that the player kills. Kinda sucks since I for some reason can't setstage when all are dead but it works. I am having trouble with a different thing but I hope some others may shed light on some ways to do what I was trying to do.
edit: just saw the above, ill try it out
edit2: didn't work, but I will give it another go at another time when I need to.
Edited by JuicyPwner
Link to comment
Share on other sites

Noob question, I am FAAAAAR from the most experienced person here, but couldn't you achieve something similar by setting up an OnDeath script for the goons you want killed and have them increase a death counter in the quest?

 

I.e. You add a short to the quest script called "short GoonsDead"

 

In the script for said goons you add a block that goes

Begin OnDeath

set YourQuestName.GoonsDead to YourQuestName.GoonsDead + 1

end

And then have the next stage of the quest set to go off when GoonsDead == 5 or something.

 

Just a thought, might be the long way to work around this. And it may not even work! I'm just spitballing.

Link to comment
Share on other sites

Noob question, I am FAAAAAR from the most experienced person here, but couldn't you achieve something similar by setting up an OnDeath script for the goons you want killed and have them increase a death counter in the quest?

 

I.e. You add a short to the quest script called "short GoonsDead"

 

In the script for said goons you add a block that goes

Begin OnDeath

set YourQuestName.GoonsDead to YourQuestName.GoonsDead + 1

end

And then have the next stage of the quest set to go off when GoonsDead == 5 or something.

 

Just a thought, might be the long way to work around this. And it may not even work! I'm just spitballing.

 

It just depends on what you're trying to do. Either one works.

Link to comment
Share on other sites

Noob question, I am FAAAAAR from the most experienced person here, but couldn't you achieve something similar by setting up an OnDeath script for the goons you want killed and have them increase a death counter in the quest?

 

I.e. You add a short to the quest script called "short GoonsDead"

 

In the script for said goons you add a block that goes

Begin OnDeath

set YourQuestName.GoonsDead to YourQuestName.GoonsDead + 1

end

And then have the next stage of the quest set to go off when GoonsDead == 5 or something.

 

Just a thought, might be the long way to work around this. And it may not even work! I'm just spitballing.

Seems reasonable though.

Link to comment
Share on other sites

If you're going to do that, make sure you put parentheses in there. Don't think the GECK will compile it as it is, can't quite remember.

 

Set YourQuestName.GoonsDead to (YourQuestName.GoonsDead +1)

 

Be careful with doing this though, the engine doesn't always register OnDeath Correctly, especially if you have a lot of NPCs in one spot at the same time. So just playtest this script a lot before committing to it. I use that line that McFearo suggested to count how many enemies are killed during defense scenes, I always set the amount of enemies a few higher than my If Statement requires to set the next stage because like I said, it won't always register correctly like it should.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...