Remove Roll and Add Explosion [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Remove Roll and Add Explosion [Solved]

Post by Fiodis »

I made a unit with no movement capabilities. I don't want him to move, ever. It all works until I throw a grenade near him. Then he rolls away. How can I prevent that?

Also, I want him to explode on death. I gave him an explosion odf and the line ChunkFrequency = 1.0 to make him explode all the time, taking the example from stock droid odfs. In-game he never explodes. Why not?

Here's his odf:
Hidden/Spoiler:
[code][GameObjectClass]
ClassParent = "com_hero_default"
GeometryName = "unit.msh"

[Properties]
ExplosionName = "obj_unit_exp"
AISizeType = "HOVER"

GeometryName = "unit"

AnimationName = "staystill"

MaxHealth = 10.0
Acceleraton = 0.0
MaxSpeed = 0.0
MaxStrafeSpeed = 0.0
MaxTurnSpeed = 0.0

CollisionScale = "0.0 0.0 0.0" // don't take damage from collisions

ChunkFrequency = 1.0

WEAPONSECTION = 1
WeaponName = "obj_weap_null"
WeaponAmmo = 0

//SOUND
SndHeroSelectable = ""
SndHeroSpawned = ""
SndHeroDefeated = ""
SndHeroKiller = ""

//VOSound = "rep_off_response_hero_command SC_Follow"
//VOSound = "rep_off_response_hero_command SC_StopFollow"
//VOSound = "rep_off_response_hero_command SC_VehicleWaitUp"
//VOSound = "rep_off_response_hero_command SC_GetIn"
//VOSound = "rep_off_response_hero_command SC_GetOut"

//VOSound = "hero_obiWan_AcquiredTarget AcquiredTarget"
//VOSound = "hero_obiWan_KillingSpree4 KillingSpree4"

VOUnitType = 190
SoldierMusic = ""
HurtSound = "r2_damage"
DeathSound = "droid_death"
AcquiredTargetSound = ""
HidingSound = ""
//ApproachingTargetSound = ""
FleeSound = ""
PreparingForDamageSound = ""
HeardEnemySound = ""
ShockFadeOutTime = ""
ShockFadeInTime = ""
ShockFadeOutGain = ""
ShockSound = ""
ClothingRustleSound = ""
//LowHealthSound = "com_inf_saber_ambient"
LowHealthThreshold = "1.1"
FoleyFXClass = "cis_inf_droid"


[/code]
And his explosion odf:
Hidden/Spoiler:
[code][ExplosionClass]
ClassLabel = "explosion"

[Properties]
LifeSpan = "0.3"
Damage = "2000.5"
DamageRadius = "4.0"
Shake = "1.0"
ShakeRadius = "2.0"
Effect = "com_sfx_explosion_xl"
ArmorScale = "5.0"
HealthScale = "1.0"
ShieldScale = "0.5"

NumChunks = "8"
ChunkGeometryName = "com_smallchunk1"
ChunkTerrainCollisions = "10"
ChunkTrailEffect = "com_sfx_chunktrail_sm"
ChunkPhysics = "FULL"
ChunkOmega = "5.0 4.0 5.0"
ChunkSpeed = "5.0 10.0"
ChunkStartDistance = "1.0"
SoundProperty = "com_weap_obj_small_exp defer"[/code]
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: Remove Roll and Add Explosion

Post by CressAlbane »

Could you just make a prop?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Remove Roll and Add Explosion

Post by Fiodis »

No, I could not.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Remove Roll and Add Explosion

Post by DarthD.U.C.K. »

about the explosion: the unit doesnt explode because you didnt specify chunksin the units odf

about the moving: i think thats hardcoded behavior, did you try to override the rollanimation with a standstillanim ?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Remove Roll and Add Explosion

Post by Fiodis »

I did not, good idea. It'll still move, though. Oh well, I'll just hope no grenades come close. Or I'll get rid of grenades altogether.

What about the explosion? That, actually, is more important.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Remove Roll and Add Explosion

Post by DarthD.U.C.K. »

DarthD.U.C.K. wrote:about the explosion: the unit doesnt explode because you didnt specify chunksin the units odf
:P
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Remove Roll and Add Explosion

Post by Teancum »

Make roll cost more energy than the character has, that way they can't use it.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Remove Roll and Add Explosion

Post by Fiodis »

Teancum wrote:Make roll cost more energy than the character has, that way they can't use it.
:o

EDIT - I gave the unit an energy of 1, but they still rolled. Also, I put in a chunk reference and now they aren't affected by Force Push/Pull, or any push at all.
Darth_Squoobus
General
General
Posts: 760
Joined: Mon Aug 03, 2009 3:21 am
Projects :: No Mod project currently.
Location: over the hills and far away

Re: Remove Roll and Add Explosion

Post by Darth_Squoobus »

Fiodis wrote:
Teancum wrote:Make roll cost more energy than the character has, that way they can't use it.
:o

EDIT - I gave the unit an energy of 1, but they still rolled. Also, I put in a chunk reference and now they aren't affected by Force Push/Pull, or any push at all.
What purpose is this unit suppoed to serve?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Remove Roll and Add Explosion

Post by DarthD.U.C.K. »

Fiodis wrote:
Teancum wrote:Make roll cost more energy than the character has, that way they can't use it.
:o

EDIT - I gave the unit an energy of 1, but they still rolled. Also, I put in a chunk reference and now they aren't affected by Force Push/Pull, or any push at all.
thats really weird 0.o but you can push droids around in the game..
maybe you have to lower the frequency a bit
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Remove Roll and Add Explosion

Post by Sky_216 »

DarthD.U.C.K. wrote:
Fiodis wrote:
Teancum wrote:Make roll cost more energy than the character has, that way they can't use it.
:o

EDIT - I gave the unit an energy of 1, but they still rolled. Also, I put in a chunk reference and now they aren't affected by Force Push/Pull, or any push at all.
thats really weird 0.o but you can push droids around in the game..
maybe you have to lower the frequency a bit
But push inexplicably fails on them sometimes...always assumed it was some weirdness with their skeletons.

But just did an experiment and turns out chunkfrequency controls how often units get pushed. At 0.1 the droids get pushed most of the time, at 0.9 they hardly ever get pushed. Weird.

Big thanks for posting this chaps - because of this the rotten droids being immune to fp dilemna looks solved. This will help with Last Days heaps, thanks again. :D
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Remove Roll and Add Explosion

Post by Fiodis »

Well, that's not so good for me, then....

Ah well, there might be a workaround. What about the rolling problem?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Remove Roll and Add Explosion

Post by AQT »

I'm not really sure but try setting all three values of the ControlSpeed for roll to 0.00s as well as the RollSpeedFactor?
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Re: Remove Roll and Add Explosion

Post by MetalcoreRancor »

I came up with a solution in my sleep, and woke myself up to tell you this Fiodis. Hope you appreciate it.

You can in theory, make a .combo file for the unit at hand, and create a dummy state for RollRight and RollLeft inputs and give transitions with those commands from Idle. Essentially you'd be removing the characters ability to roll properly, if you do it right. Just make sure they cant move in the State for its duration and it returns them to idle.
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Remove Roll and Add Explosion

Post by Sky_216 »

Actually here's one that might work - units created with CreateEntity (or something like that, uses a matrix) don't react to anything (no AI?), but still have the same physics as units (can be pushed/pulled, can be moved by walking into them).
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Remove Roll and Add Explosion

Post by Fiodis »

Thanks Sky, that works perfectly.
Post Reply