Jump to content

Recommended Posts

Posted (edited)

I'm trying to get a simple explosion with projectile working:

 

Explosion Property LibertyPrimeLaserExplosionW40k Auto Const
STATIC Property SPCMarkerOrbital Auto Const

Event OnEffectStart(Actor target, Actor caster)
Debug.Notification("spawn")
ObjectReference marker = caster.PlaceAtMe(SPCMarkerOrbital)
marker.MoveTo(caster, 0, 1000, 500)
marker.PlaceAtMe(LibertyPrimeLaserExplosionW40k)
EndEvent

 

zG8Gt8O.png

 

But it doesn't seem to be working - the projectile looks like it hits something right next to it:

YGyiIBO.jpg

 

When I toggle collision off however (TLC in console), it works:

 

DU45Fck.jpg

 

And then the instant I turn it back on:

 

nlHNROP.jpg

 

 

Does anyone know how to fix this?

Edited by Searcherz64
Posted

Problem like this seems to occur when you use PlaceAtMe or Weapon.Fire to place Projectile or Explosion.

In my case, roundabout route like below works.

Weapon.Fire( marker ) -> Projectile_Parent (explode with alt. trigger 0.0s) -> Explosion (spawn projectiles) -> Projectile_Child

Posted
  On 8/9/2018 at 4:10 AM, akiras404 said:

Problem like this seems to occur when you use PlaceAtMe or Weapon.Fire to place Projectile or Explosion.

In my case, roundabout route like below works.

Weapon.Fire( marker ) -> Projectile_Parent (explode with alt. trigger 0.0s) -> Explosion (spawn projectiles) -> Projectile_Child

 

Sorry, am a bit confused by a few things with this, the first part being Weapon.Fire. I initially thought of using Weapon.Fire but not sure how I would get a Weapon type since trying to use PlaceAtMe(WeaponForm) only gives back an ObjectReference and not a Weapon

Posted
  On 8/9/2018 at 1:38 PM, akiras404 said:

ObjectReference marker = PlaceAtMe(XMarker)

WeaponForm.Fire( marker )

will fire weapon from marker.

 

Ah I misread the Weapon Script documentation - it works now, thank you!

  • Recently Browsing   0 members

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