This might be a shot in the dark, but here it is:
I'm thinking about making a Capture The Flag (CTF) game mode, which involves two teams, each trying to attack the opposing team's base, capturing their "flag" (Large banner on a pole item), then running back to home base without dying.
So the question:
How possible is it to make the "flag" prefab show and move with the player?
Are there are existing plugins that deal with this sort of thing?
Using an item as the "Flag" in a CTF gamemode
Discussion in 'Rust Development' started by BodyweightEnergy, Aug 8, 2016.
-
It is very possible, I have a half made version for event manager
I don't know of any current publicly available plugins that deal with attaching entities but I could be wrong. @Colon Blow has done some pretty interesting things with it *cough admin sleigh
There's a fair bit of information on it on the unity forums
How Do I Programatically Attach Objects To Each Other? - Unity Answers -
Thanks for the info!
-
Someone say Admin Chariot...or sleigh.. lol. I did upgrade it a little. now has a sentry gun mounted and flames out back

And it does seem you can add a single sign post to a player and have them run around..that might be a cool capture the flag addition.
I wish the banners where a little smaller.
Last edited by a moderator: Aug 10, 2016 -
@Colon Blow hahah that sign is pretty cool, question: if you stand afk and some player will come to you, can they draw on that sign?
-
I had done CTF quite some time ago never finished it though.
-
Yes, It does seem you can.. ha ha.
-
I want this so much badly now
-
@Colon can you provide me with the script that allowed you to attach the sign's transform parent to the player's transform?
-
signEntity.SetParent(basePlayer);
-
Am I using it right?
Code:private void CreateFlag(BasePlayer player) { Vector3 flagIndicatorPos = new Vector3(player.transform.position.x, player.transform.position.y + 10, player.transform.position.z); BaseEntity flag = GameManager.server.CreateEntity("assets/prefabs/deployable/signs/sign.pole.banner.large.prefab", flagIndicatorPos, new Quaternion(), false); flag.SetParent(player); //<-- This commented out allows the flag to spawn. flag.Spawn(true); } -
I am not sure but you might need to do SetParent after spawning and then set its transform.localPosition to something like 0 2 0
-
Thank you!!!!
Worked like a charm. I will be able to do so much with this ability.Last edited by a moderator: Aug 18, 2016
