Raised This Month: $51 Target: $400
 12% 

[TF2] Make a completely custom projectile that hits players and the world


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 08-30-2015 , 08:46   [TF2] Make a completely custom projectile that hits players and the world
Reply With Quote #1

I want to make a projectile that can hit both the world and players.

I'm using a stock from super zombie fortress.

The models I'm testing are:

"models/effects/bday_gib04.mdl",
"models/player/items/scout/soccer_ball.mdl"

For some reason, the soccer ball makes the world shake every time it hits the world, so I can't really use it.

The bday gib is shaped like a circular cake.

The problem is that neither of these will contact players - they just move through them. Ideally, I want them to be able to trigger Touch functions on players, and still move through them.

I'm trying to make the thrown projectiles be able to hit players directly:
https://www.youtube.com/watch?v=sKPxNQ0clDg

Spoiler
__________________

Last edited by Chdata; 08-30-2015 at 11:26.
Chdata is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-30-2015 , 09:07   Re: [TF2] Spawn a physics model that can touch players (via sdkhooks Touch)
Reply With Quote #2

Try to see how meramus(Can't remember full name) works,

Or use the "play on spectate" method that he runs on map,
Use 'tf_avoidteammates', and then hook the touch from slimeball to victim.

"play on spectate" -
Plugin I saw somewhere that you can play on spectator team.
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 08-30-2015 , 11:28   Re: [TF2] Make a completely custom projectile that hits players and the world
Reply With Quote #3

Merasmus is his full name. All he has are those bombs in terms of physics models... I don't know if they even really collide with players or if they just rely on the explosions they spam everywhere.

And how is playing as a spectator supposed to have anything to do at all with this?

And tf_avoidteammates only affects player vs player collision, not player vs anything else, plus I already have tf_avoidteammates set to a value I want it to for game balance.
__________________
Chdata is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-31-2015 , 14:04   Re: [TF2] Make a completely custom projectile that hits players and the world
Reply With Quote #4

Quote:
Originally Posted by Chdata View Post
Merasmus is his full name. All he has are those bombs in terms of physics models... I don't know if they even really collide with players or if they just rely on the explosions they spam everywhere.

And how is playing as a spectator supposed to have anything to do at all with this?

And tf_avoidteammates only affects player vs player collision, not player vs anything else, plus I already have tf_avoidteammates set to a value I want it to for game balance.
You can hook the touch, If he plays on team spectator as a bot, he doesn't have friendly players that he can't shoot them, look into cores of characters that already got it, and look https://forums.alliedmods.net/showthread.php?t=231340

This is the best way to look how other plugins works.
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
SoulSharD
Member
Join Date: Oct 2013
Location: United Kingdom
Old 08-31-2015 , 14:29   Re: [TF2] Make a completely custom projectile that hits players and the world
Reply With Quote #5

I don't think you quite understood Chdata's question.
__________________

SoulSharD is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 08-31-2015 , 15:45   Re: [TF2] Make a completely custom projectile that hits players and the world
Reply With Quote #6

nvm: misunderstood
__________________

Last edited by Chaosxk; 08-31-2015 at 15:47.
Chaosxk is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 08-31-2015 , 15:54   Re: [TF2] Make a completely custom projectile that hits players and the world
Reply With Quote #7

Quote:
Originally Posted by Chdata View Post
Ideally, I want them to be able to trigger Touch functions on players, and still move through them.
what's the point of that? o__O
Miu is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 08-31-2015 , 15:56   Re: [TF2] Make a completely custom projectile that hits players and the world
Reply With Quote #8

I would try to use SDKHook_ShouldCollide and check see what masks I need to take action on.
KissLick is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 09-01-2015 , 08:41   Re: [TF2] Make a completely custom projectile that hits players and the world
Reply With Quote #9

Quote:
Originally Posted by Miu View Post
what's the point of that? o__O
Righteous Bison

Lightning Orb

In my case, a slime ball that detects flying through the player, and if so, its velocity zeros out so it drops on the floor in place. It should not be able to block the player's movement or stutter them for a moment at all.

Sonic wave attack

Railgun

A ghost "Boo" familiar that can follow people around.

Machina that uses a small skinny bullet like projectile to achieve headshots / hits, with projectile penetration.
https://www.youtube.com/watch?v=_9gtaDYVFmo
__________________

Last edited by Chdata; 09-01-2015 at 09:46.
Chdata is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 09-01-2015 , 08:43   Re: [TF2] Make a completely custom projectile that hits players and the world
Reply With Quote #10

Quote:
Originally Posted by TheUnderTaker View Post
You can hook the touch, If he plays on team spectator as a bot, he doesn't have friendly players that he can't shoot them, look into cores of characters that already got it, and look https://forums.alliedmods.net/showthread.php?t=231340

This is the best way to look how other plugins works.
Whatever the heck you are talking about sounds completely off topic. I'm not looking to make spectators playable.




And it's already easy to set up player vs player collision. However models can have physics properties compiled into them and I'm trying to learn more about that, and why I can't get custom spawned props to detect sdkhook touch hooks with them, etc.
__________________
Chdata is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode