Page 2 of 2
Re: VH Mode -- the concept
Posted: Fri Feb 29, 2008 7:55 pm
by Grev
Thanks Zerted! This would work great for a Death Star map...
Re: VH Mode -- the concept
Posted: Fri Feb 29, 2008 7:57 pm
by Maveritchell
Teancum wrote:[RDH]Zerted wrote:Should there be some way to repair the vehicles? A constant, slow health regen? Modder defined healing regions?
Regions'd work. We'll just create a yellow CTF 'aura' with a region underneath.
If you're going to do ZE work for the new modes, you might as well just use the vehicle repair droids, right?
Re: VH Mode -- the concept
Posted: Fri Feb 29, 2008 8:37 pm
by Teancum
Hmm, regions will be trouble as I don't have the source files for the maps anymore, plus I can't put them on shipped maps. Let's just do regeneration
Re: VH Mode -- the concept
Posted: Fri Feb 29, 2008 10:08 pm
by [RDH]Zerted
Ummm, I don't see an OnCharacterExitVehicle event...
I forgot, some unit can auto-heal the vehicles they are in. I think it would be best to just leave healing up to the units.
This is going a little faster than I expected. I'd say I'm 75% done already. Of course those last couble % are normally a killer...
For those that want it, heres basic code for putting a player in a vehicle at spawn. I haven't tested this online yet.
Code: Select all
vhSpawn = OnCharacterSpawn(
function(player)
--get the point to place the vehicle
local unit = GetCharacterUnit( player )
local point = GetEntityMatrix( unit )
local vh_name = "vehicle_"..player
--if this player's vehicle does not exist, create it
if not IsObjectAlive(vh_name) then
--create a vehicle
CreateEntity("all_hover_combatspeeder", point, vh_name)
end
--attempt to put the player in his vehicle
EnterVehicle(player, vh_name)
end
)
If anyone is wants to try this out, send me a message on XFire and we can test how well this works in MP.
Re: VH Mode -- the concept
Posted: Fri Feb 29, 2008 10:11 pm
by Maveritchell
Can't you just get the entitymatrix of the player and create the vehicle at that location? I guess I'm not sure why you need to use specific spawnpoints.
Re: VH Mode -- the concept
Posted: Fri Feb 29, 2008 10:34 pm
by [RDH]Zerted
Maveritchell wrote:I guess I'm not sure why you need to use specific spawnpoints.
Because I forgot about doing it that way. I updated the post with new code and removed the info about the other way.
The best benfit I can think of for directly using path nodes is that you could bypass a node thats too close to a wall in an existing map. Of course, cutting out the path nodes removes the hardest step for the modder and takes out over half the game mode code. Take into account the vehicle wall jumping, and the extra possible vehicle glitches don't increase that much.
Re: VH Mode -- the concept
Posted: Sat Mar 08, 2008 10:54 pm
by [RDH]Zerted
Like I said, the
last couble % are normally a killer. As far as I can tell, when you create a vehicle using CreateEntity(), that vehicle's first seat weapons don't work (it would be nice is someone else can confirm this too).
How do you want the mode to handle that?
1) Create new vehicles without first seat weapons (keep in mind that the mode is only designed to allow one player per vehicle. That could be changed...). I think the mode will be much harder if you can't move and shoot at the same time. Flying vehicles will be worse than land ones. It would still be possible to VH mode to any map no matter if you have its source or not.
2) Use vehicle spawns. Vehicles spawned at vehicle spawns fire normally, but players won't be able to be instantly put into a vehicle when that player spawns. Instead, when a vehicle spawns, it would look for a player not in a vehicle and grab that player. This also limits adding VH mode to only those maps with known vehicle spawns.
3) Use vehicle spawns, but never destroy a vehicle. Damageing a vehicle would cause that vehicle to slow down. When the player repairs the vehicle, it goes back to full speed. This causes players to only wait around once for a vehicle, compared to every time they die.
4) Drop the mode
5) Some other idea I haven't thought of
Re: VH Mode -- the concept
Posted: Sun Mar 23, 2008 4:07 pm
by Teancum
Is it possible that it's an issue with initialization? Like if we put in a sleep command for ~3-4 seconds after creating the vehicle and then force the player in, what would that do?
I guess the easiest way to figure that out is just to make a CreateEntity() script to see if it's an initialization error, or if CreateEntity() creates bad vehicles.
Re: VH Mode -- the concept
Posted: Mon Mar 24, 2008 10:37 am
by XxDepredationxX
VH mode eh, interesting. It will sure make droid space battles real again, it still bugs me till today that the vulture droid must be piloted by a battle droid than piloting itself. Well if this mod is successful, it'll probably turn Battlefront II to what it's supposed to truly be with the final conv pack and 1.2/1.3 unofficial patch
Re: VH Mode -- the concept
Posted: Mon Mar 24, 2008 11:25 am
by Teancum
Actually, this was just meant to be a ground vehicle thing -- kind of to make Star Wars: Clone Wars style gameplay.
Re: VH Mode -- the concept
Posted: Mon Mar 24, 2008 10:56 pm
by [RDH]Zerted
I had tested it with only CreateEntity(). The main weapons still didn't work.
Re: VH Mode -- the concept
Posted: Tue Mar 25, 2008 7:34 am
by Grev
I havent been able to understand the Mav- Zerted- Tean conversation here, but couldn't this have something to do with forceing AI into a vehicle? Would it be possible to do the sanme to a unit?
Re: VH Mode -- the concept
Posted: Tue Mar 25, 2008 7:37 pm
by [RDH]Zerted
Yeah, basically forcing a player/bot into a vehicle is easy and creating new entities (such as vehicles) is easy. However, when you create a new vehicle (remember this is creating it through the lua, not using a vehicle spawn point) the vehicle's weapons don't work. This wouldn't be that big of a deal in Race mode, but in Vehicle mode, theres not much to do if you can't shoot.
I haven't scrapped anything, just a new quarter started for me at school and I have been extremely busy since then (only have had time to watch this single topic). I still fully intend to finish all my open projects. I've thought of creating new vehicle spawn points instead of the actual vehicles, but I haven't tried it yet and I don't expect it to work (but it might).