Author Topic: Deployable player spawnpoints? (2-part question)  (Read 276 times)

Offline robbob42

  • Newbie
  • *
  • Posts: 30
    • View Profile
Deployable player spawnpoints? (2-part question)
« on: 04-01-2024, 02:01:32 »
Part 1: I'd like to create a use-once, short-duration player spawnpoint that any (human) player can "throw down" like the medic pack (item #8). Similar to the rally point in Project Reality, but for any player - not just the squad leader - and as part if a kit vs using the talk menu. Can it even be done?

It'll be just for my own personal play over a LAN, the idea being that if someone gets isolated and is being overrun, they can essentially do a one-time emergency "call for help" by throwing this down so his squad mates can spawn in near him to assist.

I've spent quite a bit of time doing Google & forum searches, trying a bunch of different things - all to no avail. I've looked at PR's rally point code, and got as far as getting the pile of ruck sacks to appear when I "fire" the medic kit, but it doesn't spawn anyone or even show up on the minimap. I've looked at and tried to mimic other player spawn code, but am obviously missing something. Evidently I don't understand enough about how the spawning system works to figure out what's wrong. Which leads me to....

Part 2: I've done SOME modding (mostly .tweak file changes) and imported a couple weapons. I've used the bf2editor enough to move vehicles around, but consider myself pretty much a rookie with modding. I'm also a guy who wants to understand the concept(s) behind the code - the "why" if you will. I'm not big on "take this pen and write what I tell you" (i.e. just copy in this block of code) without understanding what it's doing. If I understand the concept behind the code I can apply it to other things so I don't have to keep bugging people with one-off questions.

I know a lot of you experts have spent countless hours figuring a lot of this stuff out (VERY much appreciated!!). I'm a retired programmer and have been able to figure out a lot of things on my own as well. But is there some kind of manual/reference somewhere that explains some of these statements & concepts so I can just look up the parts I can't figure out? For example, a .con file seems to be what creates an object, along with a few parameters. Is there a reason there are additional parameters in a separate .tweak file vs just adding them directly to the .con file? What are the parts/elements you need to create a player spawn? Does an addTemplate go in the .con file or the .tweak file, or either one? And what does "activeSafe" do? That sort of thing.

I've seen "lists" of BF2 commands, but the ones I've found mostly have "unknown" next to 90% of their descriptions. I've read spawn point tutorials, but they seem to be for BF1942 and I'm not sure how much the coding syntax/spawning process has changed for BF2. Maybe I just haven't stumbled onto the right thing yet. Or maybe I'm just asking too much...

So... enough babbling... If anyone has any suggestions, or can even just point me in a direction, I'd really appreciate it! Thanks!!
RobBob
« Last Edit: 26-01-2024, 21:01:31 by robbob42 »

Offline robbob42

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Deployable player spawnpoints? (long, 2-part question)
« Reply #1 on: 26-01-2024, 02:01:29 »
OK, still trying to research this project, I came across this:
https://bfmods.com/viewtopic.php?f=43&t=417&sid=58798826d7135b47b523f0d1047224e1

Looks to be pretty much what I was looking for, tho haven't gotten to try it yet. It's also for BF1942 but hopefully can be adapted to FH2(?).

So... in trying to understand the basis/concept(s) behind this, creating the weapon and its projectile seems straightforward. The spawning part of it... Am I correct that firing the projectile essentially "triggers" an objectspawner (attached to the projectile via an addTemplate). The objectspawner then spawns a PCO which has multiple instances of a spawnpoint attached to it via addTemplates (each instance set to a slightly different location to spread things out). And those spawnpoint instances all become "active" when the PCO spawns. Pending how long they're set to "live", etc, they then act like regular spawn points that players can select and spawn to. The actual spawnpoint itself is defined in the spawnpoint template ("The Spawnpoint Setup"). Does any of that sound correct?

If so, a follow up Q: why does the objectspawner need to spawn a PCO vs just directly spawning the spawnpoints? Sorry if this is a dumb question and/or not using the right terminology - just trying to learn how this all works.

Thanks!
Robbob
« Last Edit: 26-01-2024, 03:01:42 by robbob42 »