Jump to content

On hit scripting issue


ZippyDSMlee

Recommended Posts

It's a weird blocktype that never seems to work for me.

 

I'd put it on the ammo impact script, with a ScriptEffectStart block

 

It kinda needs to be applied via a weapon script or enchantment since critical hit is occupied with disintegration.

 

edit

This is a melee weapon but I guess you could make an ammo type and apply zero to ammo used but dose not ammo need a projectile point of origin on the weapon to work?

 

/edit

 

Though know of a good way to apply disintegration via script? I keep getting glitches when I use getdead(it reapplies the disintegration with each hit when something is dead for a few seconds,have a video of this), it seems it starts the effect even if the effect itself calls to CriticalStage. I've tried the script below but it did not work in fact it caused the disintegration sound to apply with each hit but thats probably due to incorrect blocktype mixing.

 

Then again I am a total script noob. I can't seem to get getlastcritcal to work though functions and I tried all the options to apply it to target and combattarget so it must work under very specific circumstances or simply dose not work.

 

 

To be clear what I need is either a way to disintegrate a target or targets. And a way to call up an explosion on critical hit.

 

I can use random but I been trying to research getlastcritcal and there's is scant info on it.

----------------------

ref CombatTarget
  
Begin Gamemode


    If player.GetEquipped Weapzippymoujor && player.IsInCombat
        set CombatTarget to player.GetCombatTarget
        If CombatTarget.GetLastHitCritical
            Player.PlaceAtMe zippynullGrenadePulseExplosionfake 1

        Endif
    Endif

End

I find it interesting it can compile but dose not work.

Edited by ZippyDSMlee
Link to comment
Share on other sites

How about this one its not working on target below 10% > dose not seem to work at all.


ref CombatTarget

short rnd

Begin GameMode


    If player.GetEquipped Weapzippymoujor && player.IsInCombat
        set CombatTarget to player.GetCombatTarget
        If CombatTarget.GetHealthPercentage <= 0.10 
           CombatTarget.CIOS AlienDisintegrationFXSpell
            CombatTarget.kill       
      Endif
 Endif

End
Link to comment
Share on other sites

Here is a weapon script I wrote for Beyond Boulder Dome, which might be useful to you. The difference here is that I created a new variable of the type "ref" called "ChimpProdTarget" and then assigned it the value returned by the "GetOwnerLastTarget" function.

scn abChimpProdScript

Begin OnHit

	Ref ChimpProdTarget
	Set ChimpProdTarget to GetOwnerLastTarget

	If ChimpProdTarget.GetIsID abEvilChimpBare == 1 && abChimpVariablesQ.abChimpStunTime == 0 && ChimpProdTarget.getdead == 0
		ChimpProdTarget.killactor
		set abChimpVariablesQ.abChimpStunned to 1
	elseIf ChimpProdTarget.GetIsID abEvilChimpBrain == 1 && abChimpVariablesQ.abChimpStunTime == 0 && ChimpProdTarget.getdead == 0
		ChimpProdTarget.killactor
		set abChimpVariablesQ.abChimpStunned to 1
	ElseIf ChimpProdTarget.GetIsID abEvilChimpPower == 1 && abChimpVariablesQ.abChimpStunTime == 0 && ChimpProdTarget.getdead == 0
		ChimpProdTarget.killactor
		set abChimpVariablesQ.abChimpStunned to 1
	EndIf


End
Edited by rjhelms84
Link to comment
Share on other sites

  • Recently Browsing   0 members

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