Dispensable items falling straight down (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
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Dispensable items falling straight down (solved)

Post by Noobasaurus »

Sometimes, when I drop my item(such as a health pack, but slightly modified), it drops straight down. Other times, it drops slightly ahead of the person, depending on how fast they are traveling. Why does it vary between these two drop types?
Last edited by Noobasaurus on Fri Apr 13, 2012 6:23 pm, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Dispensable items falling straight down

Post by Marth8880 »

Could you post your item('s/s') ODF(s) please?
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Dispensable items falling straight down

Post by Noobasaurus »

smk_weap_inf_claymore_dispenser
Hidden/Spoiler:
[WeaponClass]
ClassParent = "com_weap_inf_claymore_dispenser"
GeometryName = "claymore.msh"

[Properties]
//NextCharge = 0.99
OrdnanceName = "com_weap_inf_claymore"
HUDTag = "claymore"

//************************************************
//***************** SOUND ************************
//************************************************

FireSound = "com_weap_throw"
FireEmptySound = "com_weap_inf_ammo_empty"
FireLoopSound = ""
//ReloadSound = "com_weap_inf_equip_med"
ChargeSound = ""
ChargeSoundPitch = ""
ChangeModeSound = "com_weap_inf_equip_med"
WeaponChangeSound = "com_weap_inf_equip_med"
OverheatSound = ""
OverheatSoundPitch = ""
OverheatStopSound = ""
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_squat"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"
com_weap_inf_claymore
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "mine"

[Properties]
GeometryName = "claymore"
//HighResGeometry = "com_1st_weap_inf_landmine"

TrailEffect = "claymore_nor"
LightColor = "0 0 0 0"
LightRadius = "0.0"

ExplosionTrigger = "com_weap_inf_claymore_exp"
ExplosionDeath = "com_weap_inf_claymore_destroyed_exp"
ExplosionExpire = "com_weap_inf_claymore_destroyed_exp"

TriggerContact = "1"
TriggerRadius = "0.4"
//SuppressRadius = "1.0"

HealthType = "Mine"

LifeSpan = "99999999999999999.0"
NoLifeSpanDisplay = "1"

MaxHealth = "300"
Velocity = "0.0"
Gravity = "1.0"
Rebound = "0.0"
Friction = "1.0"

CollisionOtherSound = "com_weap_mine_land"
com_weap_inf_claymore_dispenser
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "dispenser"

[Properties]
RoundsPerClip = "1"
ReloadTime = "1.0"

//AnimationBank = "grenade"
OffhandWeapon = 1

TrackingSound = ""

ShotDelay = "0.0"
MaxItems = "9999999999999999999.0"
AutoAimSize = "1.0"

SalvoCount = "1"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.5"

MinStrength = "0.3"
MaxStrength = "0.4"

//MaxPressedTime = "1.5"
I don't think you need the explosions.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Dispensable items falling straight down

Post by Marth8880 »

Try increasing the velocity in the ordnance ODF if you want it to always fly forward a little bit, which I'm not even sure you want because I'm not sure what you are asking.

Also, this is unrelated, but:

Code: Select all

MaxItems	 = "9999999999999999999.0"
Having that high of a value is probably seen by the engine as an overflow and the parameter is probably being ignored. If I am correct, simply not having the parameter in the ODF at all will equate to the max number being infinite, as will having a value of "99999". Also again, with that kind of value, you would want to have an integer value instead of decimal value since you can't have a fraction of an item. It shouldn't really matter, but it's still a good habit to get into correcting.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Dispensable items falling straight down

Post by Noobasaurus »

I increased the velocity and it's working pretty well.
Marth8880 wrote:simply not having the parameter in the ODF at all will equate to the max number being infinite
I removed it and now after placing 39 of them I can't place any more. My character does the animation but nothing happens and no claymores explode.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Dispensable items falling straight down

Post by Marth8880 »

Ah, that's probably a memory issue or something then, makes sense.
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: Dispensable items falling straight down

Post by Fiodis »

You could probably resolve it by increasing one of those SetMemoryPoolSize values in the respective LUA. I'm afraid I don't know which one corresponds to a detpack-type item, though; I've never needed to use that pool myself. Maybe UnitController? Sorry I can't be more help. :(
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: Dispensable items falling straight down

Post by Dakota »

I had the code for it but i lost it somewhere, theres a topic with it somewhere though, i'll look for it.

heres that topic, i'm glad i posted on it as a bookmark...

http://www.gametoast.com/forums/viewtop ... 27&t=27518

its the entitymine one in the first list. you just set it up like the other entity codes.

SetMemoryPoolSize("EntityMine", 100)

100 being the number that you want to be the mine limit... yet it could be higher or lower.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Dispensable items falling straight down

Post by Noobasaurus »

Thanks everyone, it's working great now!
Post Reply