Weapon OCL nugget
#1
Posted 05 February 2008 - 05:36 PM
#2
Posted 05 February 2008 - 07:19 PM
#3
Posted 05 February 2008 - 08:26 PM
it is because the arrow itself is another object. try adding that oclnugget to the warhead thigy specified in the weapon code instead of the actual weapon
My apologies, I should have said that it was in the coding for the warhead. The damage is done at the impact location, but the OCL still originates from the firing location. For now I'm trying to see if I can use the effects from the Morgul Blade to get the effect I want and am getting mixed results. They die and spawn Barrow Wights, but they aren't acting quite right and die way to soon in relation to the timer for them.
#4
Posted 05 February 2008 - 09:26 PM
Once you have got the projectile name, look for it in the file 'subobjects.ini'. There are two, one is in the good object folder, one is in the evil object folder. Once you have found it, add a ''CreateObjectDie' or something that defines what OCL is triggered once the projectile object 'dies'. There are one or two examples in the subobjects.ini file, but you could look in 'neutralunits.ini' inside the first object (the balrog) for more code.
If you place the OCL in the projetile, the stuff appears where it hits.
You can also look here for a more indepth explanation by me: Bodies and Arrows
Edited by Sûlherokhh, 05 February 2008 - 10:08 PM.
Axed Head and A.I. Coder for S.E.E. and ... stuff
".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."
#5
Posted 07 February 2008 - 09:02 AM
#7
Posted 10 August 2016 - 03:29 PM
If someone is still interested in how to spawn an object with a warhead, this is what I did to throw an isengard explosive mine:
First the weapon.ini, a simple weapon with a warhead and the projectile template with the model of a mine:
;------------------------------------------------------------------------------
Weapon UrgannThrowExplosiveMine ; BALANCE CaveTroll Weapon Rock
;IdleAfterFiringDelay = 2000 ; Do NOT idle after throwing or Bombard will break
HoldDuringReload = Yes
AttackRange = MORDOR_TROLL_ROCK_RANGE
WeaponSpeed = 200.0 ; dist/sec (huge value == effectively instant)
FireFX = FX_EntThrowSmallRock
PreAttackDelay = 1400
FiringDuration = 2000
PreAttackType = PER_SHOT ; Do the delay each time we attack a new target
DelayBetweenShots = 6100
HitPercentage = 0 ; never auto hits, always hits ground
ScatterRadius = 4.0 ; When this weapon misses it can randomly miss by as much as this distance.
IsAimingWeapon = Yes ; Shooter will use his AimWeaponBehavior to get extra model condition flags
NoVictimNeeded = Yes ; Need no target
LeechRangeWeapon = Yes
AutoReloadWhenIdle = 1500 ; should be a bit less than IdleAfterFiringDelay
ClipSize = 1
AutoReloadsClip = Yes
ClipReloadTime = 2100
ProjectileNugget ; A Nugget that creates an Object and sends it to the target with a Warhead
ProjectileTemplateName = ThrowableExplosiveMine ;IsengardExplosiveMine ;RockBigTroll
WarheadTemplateName = UrgannExplosiveMineThrowWarhead
End
End
;-----------------------------------
Weapon UrgannExplosiveMineThrowWarhead
ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS ; Remember, the projectile is a rock, who has no allies
; FireFX = FX_RockDetonation
DamageNugget ; A basic Nugget that just does damage
Damage = MORDOR_CAVE_TROLL_ROCK_DAMAGE
Radius = 12.0
DamageType = SIEGE
DamageFXType = SMALL_ROCK
DeathType = NORMAL
End
MetaImpactNugget ; A Nugget that throws things back with force
; HeroResist = .75
ShockWaveAmount = 50.0
ShockWaveRadius = 12.0
ShockWaveTaperOff = 0.5
ShockWaveZMult = 1.20
End
End
;-----------------------------------------------------
This is the projectile template, the object inherit the treebeard rock but it isn't important
ChildObject ThrowableExplosiveMine RockBigTreeberd
Draw = W3DScriptedModelDraw ModuleTag_01
DefaultModelConditionState
Model = IU_BOMB_SKN
End
End
Here i used a behaviour that spawn an ocl when the unit die...in this case when the warhead hit the ground or the target
Behavior = CreateObjectDie ModuleTag_CrushUnitsOnDeath
CreationList = OCL_SpawnExplosiveMine
End
End
I hope this could help someone
Edited by Symonius, 10 August 2016 - 03:30 PM.
"All we have to decide is what to mod with the time that is given us"
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users