Jump to content

Scripted Alien Blaster kill help.


Crystalking52

Recommended Posts

rTarget.KillActor player

rTarget.CIOS AlienDisintegrationFXSpell

 

rTarget is a reference-type variable that should hold the target NPC's Reference ID when executing the above commands.

Greetings sir, I'm afraid CIOS did not work. KillActor Player did work however (it credited my character with the kill, but removing the player part fixed that.) Anything else I could try?

Link to comment
Share on other sites

It saved fine, but the effect did not show up in-game at all nor was the corpse replaced with an ash pile (this does not perturb me much as I just want the corpse to be permanently blue and see-through.) I am using an edited VERT5AlienWWScript to enable the Mercenary Leader regardless of whether you have Wild Wasteland or not, but if you do have it, he spawns killed by an Alien Blaster. Here's the script:

Scn	VERT5AlienWWScript
; - Jorge

Short	bPlayerEnters
Short	bEventFound
Short	bEventFinished
Short	iCount

Float fTimer



Begin OnLoad

	If bEventFinished != 1
		Set bPlayerEnters to 1
	Else
		Disable
		MarkForDelete
	Endif

End


Begin GameMode

If bEventFinished != 1
	If bPlayerEnters == 1
		If Player.HasPerk WildWasteland == 1
			If bEventFound != 1
				If GetDistance Player >= 6000 || VERT5AlienShipREF.GetDisabled != 1
					Set fTimer to ( fTimer + GetSecondsPassed )
					If iCount < 1
						VERT5AlienShipREF.Enable
						Set iCount to 1
					Elseif iCount == 1 && fTimer >= 0.5
						VERT5AlienCaptainREF.Enable
						VERT5MercBossREF.Enable
						VERT5MercBossREF.KillActor
						VERT5MercBossREF.CIOS AlienDisintegrationFXSpell
						VERT5MercBossREF.EquipItem ArmorCombatReinforced
						VERT5MercBossREF.EquipItem ArmorCombatHelmetReinforced
						Set iCount to 2
						Return
					Elseif iCount == 2 && fTimer >= 1
						VERT5Alien01REF.Enable
						Set iCount to 3
						Return
					Elseif iCount == 3 && fTimer >= 1.5
						VERT5Alien02REF.Enable
						Set bEventFound to 1
						Set iCount to 0
						Return
					Endif
				Endif
			Else
				If Player.GetItemCount WeapAlienBlaster >= 1
					Set bEventFinished to 1
				Endif
			Endif
		Elseif Player.HasPerk WildWasteland != 1
			If bEventFound != 1
				If GetDistance Player >= 6000 || VERT5MercBossREF.GetDisabled != 1
					Set fTimer to ( fTimer + GetSecondsPassed )
					If iCount < 1
						VERT5MercBossREF.Enable
						Set iCount to 1
					Elseif iCount == 1 && fTimer >= 0.5
						VERT5Merc01REF.Enable
						Set iCount to 2
						Return
					Elseif iCount == 2 && fTimer >= 1
						VERT5Merc02REF.Enable
						Set iCount to 3
						Return
					Elseif iCount == 3 && fTimer >= 1.5
						VERT5Merc03REF.Enable
						Set iCount to 4
						Return
					Elseif iCount == 4 && fTimer >= 2
						VERT5Merc04REF.Enable
						Set bEventFound to 1
						Set iCount to 0
						Return
					Endif
				Endif
			Else
				If Player.GetItemCount WeapNVGaussRifleUnique >= 1
					Set bEventFinished to 1
				Endif
			Endif
		Endif
	Endif
Endif

End
Link to comment
Share on other sites

I suspect enabling an actor and calling CIOS on it, both in the same frame, will not work properly. Try this:

Scn	VERT5AlienWWScript
; - Jorge

Short	bPlayerEnters
Short	bEventFound
Short	bEventFinished
Short	iCount

Float fTimer

Short	bApplyEffect

Begin OnLoad

	If bEventFinished != 1
		Set bPlayerEnters to 1
	Else
		Disable
		MarkForDelete
	Endif

End


Begin GameMode

	If bEventFinished != 1
		If bPlayerEnters == 1
			If Player.HasPerk WildWasteland == 1
				If bEventFound != 1
					If GetDistance Player >= 6000 || VERT5AlienShipREF.GetDisabled != 1
						Set fTimer to ( fTimer + GetSecondsPassed )
						If iCount < 1
							VERT5AlienShipREF.Enable
							Set iCount to 1
						Elseif iCount == 1 && fTimer >= 0.5
							VERT5AlienCaptainREF.Enable
							VERT5MercBossREF.Enable
							set bApplyEffect to 1
							Set iCount to 2
							Return
						Elseif iCount == 2 && fTimer >= 1
							VERT5Alien01REF.Enable
							Set iCount to 3
							Return
						Elseif iCount == 3 && fTimer >= 1.5
							VERT5Alien02REF.Enable
							Set bEventFound to 1
							Set iCount to 0
							Return
						Endif
					Endif
				ElseIf Player.GetItemCount WeapAlienBlaster >= 1
					Set bEventFinished to 1
				Endif
			Elseif Player.HasPerk WildWasteland != 1
				If bEventFound != 1
					If GetDistance Player >= 6000 || VERT5MercBossREF.GetDisabled != 1
						Set fTimer to ( fTimer + GetSecondsPassed )
						If iCount < 1
							VERT5MercBossREF.Enable
							Set iCount to 1
						Elseif iCount == 1 && fTimer >= 0.5
							VERT5Merc01REF.Enable
							Set iCount to 2
							Return
						Elseif iCount == 2 && fTimer >= 1
							VERT5Merc02REF.Enable
							Set iCount to 3
							Return
						Elseif iCount == 3 && fTimer >= 1.5
							VERT5Merc03REF.Enable
							Set iCount to 4
							Return
						Elseif iCount == 4 && fTimer >= 2
							VERT5Merc04REF.Enable
							Set bEventFound to 1
							Set iCount to 0
							Return
						Endif
					Endif
				ElseIf Player.GetItemCount WeapNVGaussRifleUnique >= 1
					Set bEventFinished to 1
				Endif
			Endif
		Endif
	Elseif bApplyEffect
		set bApplyEffect to 0
		VERT5MercBossREF.KillActor
		VERT5MercBossREF.CIOS AlienDisintegrationFXSpell
		VERT5MercBossREF.EquipItem ArmorCombatReinforced
		VERT5MercBossREF.EquipItem ArmorCombatHelmetReinforced
	Endif

End
Link to comment
Share on other sites

Tried your script and it left the Mercenary Leader alive. But I tried shifting the kill command and the cios command to another icount section and that did the trick! I didn't even need the equip commands either (before he was spawning in with nothing equipped, probably also to do with killing him as soon as he was enabled.)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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