new entity suggestion: firing guns
- Broken
- Posts: 404
- Joined: Sat May 10, 2014 12:25 pm
- Player profile: http://ddnet.tw/players/Broken/
- Mapper profile: http://ddnet.tw/mappers/Broken/
new entity suggestion: firing guns
This may be a bit difficult to implement, idk, but you could make a ton of cool parts with it.
A weapon firing entity, that fires at a given angle and timing. For grenades, you could specify the speed as well.
So like a "turret" entity that simply fires grenades. Example idea: you have to use several of them to jump obstacles
The idea then is not giving the player the weapon to use anywhere, but forcing them to use these instead.
A weapon firing entity, that fires at a given angle and timing. For grenades, you could specify the speed as well.
So like a "turret" entity that simply fires grenades. Example idea: you have to use several of them to jump obstacles
The idea then is not giving the player the weapon to use anywhere, but forcing them to use these instead.
-
- Posts: 104
- Joined: Tue Jun 10, 2014 11:28 am
- Player profile: http://ddnet.tw/players/Cyberpunk/
- Mapper profile: http://ddnet.tw/mappers/Cyberpunk/
Re: new entity suggestion: firing guns
Very good idea. And to trigger one of them you can shoot a button with your pistol. That is probably impossible to implement but your idea isnt I am sure.
- timakro
- Posts: 414
- Joined: Mon May 05, 2014 6:05 pm
- Location: Germany
- Player profile: http://ddnet.tw/players/timakro/
- Mapper profile: http://ddnet.tw/mappers/timakro/
- Clan: unique
Re: new entity suggestion: firing guns
nothing of that is impossible to implement. but cyberpunks idea is weired. i like brokens idea. if nobody wants to implement it i would give it a try when im back home. but i cant promise anything.
- deen
- Posts: 3576
- Joined: Mon May 05, 2014 2:30 pm
- Player profile: https://ddnet.org/players/deen/
- Discord: deen#5910
Re: new entity suggestion: firing guns
Go ahead, DoNe. I think it's fine, but don't want to implement it.
- timakro
- Posts: 414
- Joined: Mon May 05, 2014 6:05 pm
- Location: Germany
- Player profile: http://ddnet.tw/players/timakro/
- Mapper profile: http://ddnet.tw/mappers/timakro/
- Clan: unique
Re: new entity suggestion: firing guns
It's done. Get source to test here: https://github.com/timgame/ddnet
- Broken
- Posts: 404
- Joined: Sat May 10, 2014 12:25 pm
- Player profile: http://ddnet.tw/players/Broken/
- Mapper profile: http://ddnet.tw/mappers/Broken/
Re: new entity suggestion: firing guns
Awesome love it !!!
- timakro
- Posts: 414
- Joined: Mon May 05, 2014 6:05 pm
- Location: Germany
- Player profile: http://ddnet.tw/players/timakro/
- Mapper profile: http://ddnet.tw/mappers/timakro/
- Clan: unique
Re: new entity suggestion: firing guns
Because of a dump mistake i made there is a big bug. I don't have much time and motivation to fix it. Maybe I will fix it in the future.
- Broken
- Posts: 404
- Joined: Sat May 10, 2014 12:25 pm
- Player profile: http://ddnet.tw/players/Broken/
- Mapper profile: http://ddnet.tw/mappers/Broken/
Re: new entity suggestion: firing guns
Ok thanks for trying anyway
- timakro
- Posts: 414
- Joined: Mon May 05, 2014 6:05 pm
- Location: Germany
- Player profile: http://ddnet.tw/players/timakro/
- Mapper profile: http://ddnet.tw/mappers/timakro/
- Clan: unique
Re: new entity suggestion: firing guns
Autofire should be a mapping tile that spawns a grenade, rifle or shotgun every x seconds in an angle of 45*y degrees. The tiles are in switch layer. The tileflags of the switchlayer are Number = x and Delay = y. The index are 226 = shotgun, 227 = grenade and 338 = rifle.
If somebody is interested in fixing this feature I give some information here. The newest code can be found at https://github.com/timgame/ddnet. The code in entities/autofire.cpp in CAutofire::Tick() in the condition "if (m_Time >= m_Delay) {" will be executed when a projectile/laser has to be spawned. I created a switch for the different weapon types. Everything that happens before the spawning of the projectiles and lasers works fine. You don't have to care about that. The problem is that im spawning one projectile for all teams at the moment. For example if a player in team 0 stops a projectile it will also be stopped for the player in team 5. I modified some code in laser.cpp and projectile.cpp to make this happen when i create a laser/projectile for the clientID -1. To fix this bug a projectile/laser for every team would be necessary. I found no solution because CLaser and CProjectile are made for a clientID and not for a teammask. I tried to modify it and make it work for teammasks but thats really a pain. Especially the projectile.cpp contains really ugly code in my opinion. I would be very interested in the solution if anybody can find one. If you have questions about my code add me in skype: "bschutim".
If somebody is interested in fixing this feature I give some information here. The newest code can be found at https://github.com/timgame/ddnet. The code in entities/autofire.cpp in CAutofire::Tick() in the condition "if (m_Time >= m_Delay) {" will be executed when a projectile/laser has to be spawned. I created a switch for the different weapon types. Everything that happens before the spawning of the projectiles and lasers works fine. You don't have to care about that. The problem is that im spawning one projectile for all teams at the moment. For example if a player in team 0 stops a projectile it will also be stopped for the player in team 5. I modified some code in laser.cpp and projectile.cpp to make this happen when i create a laser/projectile for the clientID -1. To fix this bug a projectile/laser for every team would be necessary. I found no solution because CLaser and CProjectile are made for a clientID and not for a teammask. I tried to modify it and make it work for teammasks but thats really a pain. Especially the projectile.cpp contains really ugly code in my opinion. I would be very interested in the solution if anybody can find one. If you have questions about my code add me in skype: "bschutim".
Who is online
Users browsing this forum: No registered users and 44 guests