Jump to content

How do you script a quest where you must kill a set amount of creatures in the Mojave?


Deleted45994732User

Recommended Posts

I was scripting a quest where you talk to an NPC, need to kill five geckos and then talk to the same NPC to end the quest. There are no geckos spawned by this quest, the goal was to have the player find them wherever like South of Goodsprings. I don't know how to count geckos killed. I looked at the F3 quest Wasteland Survival Guide in the part for killing Mole Rats and I'm still not sure how to have the quest count critters killed. The last thing I tried was using the GetInFaction function but I didn't know how to use it properly

scn GeckosNeutralized

ref HitTarget

Begin ScriptEffectStart

set HitTarget to GetSelf
	
if HitTarget.getinfaction GeckoFaction == 1
	if MyCompanionQuest1112.GeckosKilled < 5
		set MyCompanionQuest1112.GeckosKilled to (MyCompanionQuest1112.GeckosKilled +1)
	endif
endif
end

It used to be an object script and use the blocktype gamemode. I don't completely understand how GetSelf works, just that it returns the ReferenceID of the calling reference. I also don't know what to attach the script to, if anybody can point me in the right direction I'd be thankful.

Link to comment
Share on other sites

I think I figured it out, and I attached the script to multiple vanilla gecko objects. If there's an easier way than doing this, don't hesitate to post.

scn GeckoScript

ref HitTarget

Begin OnDeath

	if GetStage TutorialQuest11 == 5
		set HitTarget to GetSelf
		if HitTarget.GetInFaction GeckoFaction == 1
			set TutorialQuest11.GeckosKilled to (TutorialQuest11.GeckosKilled +1)
		endif
	endif
end

I have it attached to NVCrGecko, VCrTier2GeckoMed, and VCrTier1GeckoSmall (I couldn't find the hunter variants but are they VSpawnSpecialTier2GeckoMedGSHunter and VSpawnSpecialTier1GeckoSmallGSHunter?). It's supposed to be plain geckos and gecko hunters to make it easy to test for myself. It's also attached to Gojira and NVCrFireGeckoDEAD but I didn't set it that way so I don't know why they're using the script. I don't understand some of the abbreviations so any clarification would be very much appreciated.

Edited by Guest
Link to comment
Share on other sites

  • Recently Browsing   0 members

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