Page 1 of 1

Creating a spawn beacon

Posted: Sat Jan 10, 2009 9:11 pm
by Fiodis
I am making a pseudo-sides mod, along the lines of BFX.

For it, I thought it'd be great if the commanders had a "spawn beacon". I don't see it on the BF2 limitations list, so I think, why not?

So I attempted to rig a recon droid to be a command vehicle. It doesn't crash, in-game, but on problem with it is that, well....

You know how with a normal recon droid you can press "e" to exit and go back to your main unit, and walk around as him with the recon droid still there? When I try that with the spawn beacon, I become the "invisible man". I have no geometry. I am totally invisible, and enemy shots pass right through me. I even fall through terrain. Is there any way to fix this?

My rep_weap_inf_spawn odf and ord.odf:
Hidden/Spoiler:
[code][WeaponClass]
ClassParent = "com_weap_inf_spawn"

[Properties]
HUDTag = "com_weap_probedroid"
GeometryName = "com_weap_inf_grenadethermal_ord"
OrdnanceName = "rep_weap_inf_spawn_ord"
LODPriorityMod = "10.0"

FireLoopSound = ""
ReloadSound = "com_weap_inf_equip_med"
ChargeSound = ""
ChargeSoundPitch = ""
ChangeModeSound = "com_weap_inf_equip_med"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_pistol_mvt_jump"
LandSound = "com_weap_inf_pistol_mvt_land"
RollSound = "com_weap_inf_pistol_mvt_roll"
//ProneSound = "com_weap_inf_pistol_mvt_lie"
SquatSound = "com_weap_inf_pistol_mvt_squat"
//StandSound = "com_weap_inf_pistol_mvt_getup"
[/code]
and the ord:
Hidden/Spoiler:
[code][GameObjectClass]
ClassLabel = "commandflyer"
GeometryName = "com_weap_probedroid.msh"

[Properties]
ImpactEffectWater = "com_sfx_watersplash_ord"

GeometryName = "com_weap_probedroid"

ExplosionName = "rep_weap_inf_spawn_exp1"

FLYERSECTION = "BODY"
VehicleType = "light"

PilotType = "remote"

MapTexture = "troop_icon"
HealthTexture = "HUD_com_probedroid_health_icon"
MapScale = 1.0

MapViewMin = 50
MapViewMax = 50
MapSpeedMin = 0
MapSpeedMax = 100

CollisionScale = 10.0

MaxHealth = 100.0
AddHealth = -1.0

EnergyAutoRestore = -1.7

SetAltitude = 2.0
GravityScale = 1.0//2
LiftSpring = 10.0 //10Lighter the veh the high the number
LiftDamp = 3.0

ScanningRange = 30.0
TransmitRange = 300.0

Acceleration = 25.0
Deceleration = 3.0
Traction = 22.0
ForwardSpeed = 3.5
ReverseSpeed = 3.5
StrafeSpeed = 0.25

SpinRate = 1.5
TurnRate = 1.5
TurnFilter = 5.0
PitchRate = 2.0
PitchFilter = 5.0
BankAngle = 0.0
BankFilter = 0

MoveTension = "30.0"//how much swim the craft has from the center of the screen


LevelSpring = 5.0
LevelDamp = 3.0

EyePointOffset = "0.0 0.5 0.0"
TrackOffset = "0.0 -0.25 1.8"
TiltValue = "5.0"

DestructTrackOffset = "0.0 0.0 18.0"
DestructTiltValue = "10.0"
DestructChargeEffect = "com_sfx_weap_remotedroidcharge2"

PitchLimits = "-50.0 50.0"
YawLimits = "-0.0 0.0"
AimerPitchLimits = "-90 90"
AimerYawLimits = "-90 90"

WEAPONSECTION = 1
WeaponAmmo = 0
WeaponChannel = 0

WEAPONSECTION = 2
WeaponAmmo = 1
WeaponChannel = 1

AISizeType = "SOLDIER"

AmbientSound = "remotedroid_engine_lp"
Ambient2Sound = "remotedroid_radio"
HurtSound = ""
DeathSound = ""

SpawnPointCount = "6"
SpawnPointLocation = "-6.0 0.0 4.0 0"
SpawnPointLocation = "6.0 0.0 4.0 0"
SpawnPointLocation = "-7.0 0.0 0.0 0"
SpawnPointLocation = "7.0 0.0 0.0 0"
SpawnPointLocation = "-6.0 0.0 -4.0 0"
SpawnPointLocation = "6.0 0.0 -4.0 0"
AllyCount = 65536
Radius = 0.0
ValueBleed = 10
Value_ATK_Alliance = 10
Value_ATK_CIS = 10
Value_ATK_Empire = 10
Value_ATK_Republic = 10
Value_ATK_Locals = 0
Value_DEF_Alliance = 0
Value_DEF_CIS = 0
Value_DEF_Empire = 0
Value_DEF_Republic = 0
Value_DEF_Locals = 0
HUDIndexDisplay = 0

\\\\\\\\\\\\ Collision \\\\\\\\\\\\\\

BuildingCollision = "p_buildingsphere"
VehicleCollision = "p_buildingsphere"
OrdnanceCollision = "p_sphere"
SoldierCollision = "p_sphere"




[/code]
I copied the spawn lines out of the AT-TE's odf.

Re: Creating a spawn beacon

Posted: Sat Jan 10, 2009 9:27 pm
by Maveritchell
http://www.gametoast.com/forums/viewtop ... 6&start=20

Only way to really do it. Warning: you will have to learn how or know how to do some .lua coding.

Re: Creating a spawn beacon

Posted: Sat Jan 10, 2009 10:14 pm
by Fiodis
Thanks, Mav! That was really helpful!

I tried setting the ordance to be that bldg_fowardcenter thing, and it does drop that foward center, and it does show up on the map as a spawn loaction, but I can't select it. All the other methods in that post seemed way too advanced for me, so if I can get this method to work that'd be great! :D

I think the can't-select problem is caused by it not being properly loaded in the LUA. Like, you know how if you add a command walker you have to add a line in the LUA specifying how many there are? And the same for flyers? What exactly would I put for this? Because it's not a walker, or a flyer; it's an object.

EDIT - D'oh! I'll look at the Hoth LUA and see how they set up the shield generator. Maybe that'll help; if not I'll edit this post.


EDIT 2 - I saw in the Endor and Hoth LUAs that they add an extra AddCommandPost line at the top, and no memorypool thing. My question is: how do I find the name of the command post I add? For that shield generator, it was CP7, for the Endor bunker, it was CP10. How to I find it for the forward center?


EDIT 3 - Saw Mav's post. I'll try to stumble through those formidable LUAs.

EDIT 4 - Mav, won't that just teleport them to you where ever you are, and it won't be onder their control? What I want to make is a trully dispensable cp. I know you say it absolutely can't be done - but then you "can't" make a grappling hook either. Basically, I want it to function like that beacon in BF2142, where you can choose it on the map and spawn to that location if you wish.

Re: Creating a spawn beacon

Posted: Sat Jan 10, 2009 10:16 pm
by Maveritchell
You can't dispense a command post (and have it work as such), if you read through the thread. The solution starts on page 2 or page 3, and it involves using a LUA weapon (specifically a null dispenser) to teleport units to you on command.

Re: Creating a spawn beacon

Posted: Sun Jan 11, 2009 12:48 am
by Sky_216
@Fiodis: also, you should be aware that only one unit (per team I think) can use it at a time. So don't give it to a unit that there can be more than one of.

Re: Creating a spawn beacon

Posted: Sun Jan 11, 2009 1:10 am
by Maveritchell
Fiodis wrote:EDIT 4 - Mav, won't that just teleport them to you where ever you are, and it won't be onder their control? What I want to make is a trully dispensable cp. I know you say it absolutely can't be done - but then you "can't" make a grappling hook either. Basically, I want it to function like that beacon in BF2142, where you can choose it on the map and spawn to that location if you wish.
You can't make a grappling hook and you can't dispense a command post. I made a .lua workaround to a grappling hook, this is the .lua workaround to the command post.