Hi there. I hope it's okay to post something in the UT2k4 section. I looked around but couldn't find any rules against it. I know the game is 12 years old at this point, but I'm hoping someone out there will be able to help me.
I've been feeling the modding itch, and since my current computer can't run UT3 or 4, I thought I'd take a crack at something in good old UT2k4 based on a mod I was working on back when I could run UT3. I'm working on a VIP/Hunted/Assassination gametype, and so far it's going okay. I still need to figure out how to set up different "classes" (i.e., the VIP, a sniper class, a medic class, etc.), but first I'm just trying to see if I can set one person to be a target for the enemy team. I figured the easiest way to do this would be to have someone start with a flag; in this case, the bomb from Bombing Run, since it's a single-flag sort of gametype.
However, from digging through the xBombFlag, GameObject, and Decoration classes, it seems the only way to get a flag is to physically touch it. At that point, it takes the touching Pawn's controller and sets that to be the flag's owner. I've tried calling the xBombFlag directly in the gametype's PostBeginPlay(), which seems to be when the match starts, but I couldn't figure out the correct syntax to do so. I also tried creating a new instance of my custom GameObject and assigning it to a player, but I couldn't find any examples of spawning something through code, and the things I tried didn't work.
Does anyone have any ideas on how I might accomplish this? Is this something that can really only be accomplished through level design (like putting the spawn for the "flag" over one of the player spawns so they automatically become the VIP)? Any help on this is greatly appreciated!
I've been feeling the modding itch, and since my current computer can't run UT3 or 4, I thought I'd take a crack at something in good old UT2k4 based on a mod I was working on back when I could run UT3. I'm working on a VIP/Hunted/Assassination gametype, and so far it's going okay. I still need to figure out how to set up different "classes" (i.e., the VIP, a sniper class, a medic class, etc.), but first I'm just trying to see if I can set one person to be a target for the enemy team. I figured the easiest way to do this would be to have someone start with a flag; in this case, the bomb from Bombing Run, since it's a single-flag sort of gametype.
However, from digging through the xBombFlag, GameObject, and Decoration classes, it seems the only way to get a flag is to physically touch it. At that point, it takes the touching Pawn's controller and sets that to be the flag's owner. I've tried calling the xBombFlag directly in the gametype's PostBeginPlay(), which seems to be when the match starts, but I couldn't figure out the correct syntax to do so. I also tried creating a new instance of my custom GameObject and assigning it to a player, but I couldn't find any examples of spawning something through code, and the things I tried didn't work.
Does anyone have any ideas on how I might accomplish this? Is this something that can really only be accomplished through level design (like putting the spawn for the "flag" over one of the player spawns so they automatically become the VIP)? Any help on this is greatly appreciated!
Comment