Capture the flag mod

As a highschool project me and my friend chosed a signment to mod on dota 2, we also want to creat a new map and the idea was "Capture the flag". Game is about as it sounds like, about to steal the flag from the other team. Problem is, we need someone who can program the flag and make the flag works. Also animation on holding the flag. I will appreciate it if you guys could help us to make it possible. While holdning the flag, you are silenced and the flag will drop at the place you die, the flag will reset to the enemy base if you don't pick it up within 10s. While holding the flag the movementspeed will be reduced by 10%.

We have self design map but non-working flag system.

Comments

  • Isn't the point of a school project to do it yourself?

  • Well we are not sure how to do it but we will apperciate the help if we could get it here or anyone could teach us to do it or give us some links for tutorials. @DoctorGester

  • edited October 2016 Posts: 412

    That's better.

    So the way I would take to do that is:

    1. Make a unit with a flag model.
    2. Make a script using timers which takes all heroes and checks how close they are to the flag every 0.03 or something like that.
    3. If a hero is close to a flag you just do flag:SetParent(hero), this won't look good at first but you can cover the details later.
    4. Then you add a modifier to a hero which silences/slows him, refer to the datadriven ability breakdown for that.
    5. You create an event listener which listens to hero death and checks if he had a flag, if he does you :SetParent(null) (I think so).

    Start with that and then see what you are missing.

    Tutorials: https://moddota.com/forums/tutorial-index

  • @DoctorGester , Thank you for the help :)