AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [TF2] Make a completely custom projectile that hits players and the world (https://forums.alliedmods.net/showthread.php?t=270825)

Chdata 08-30-2015 08:46

[TF2] Make a completely custom projectile that hits players and the world
 
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

TheUnderTaker 08-30-2015 09:07

Re: [TF2] Spawn a physics model that can touch players (via sdkhooks Touch)
 
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.

Chdata 08-30-2015 11:28

Re: [TF2] Make a completely custom projectile that hits players and the world
 
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.

TheUnderTaker 08-31-2015 14:04

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

Originally Posted by Chdata (Post 2338316)
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.

SoulSharD 08-31-2015 14:29

Re: [TF2] Make a completely custom projectile that hits players and the world
 
I don't think you quite understood Chdata's question.

Chaosxk 08-31-2015 15:45

Re: [TF2] Make a completely custom projectile that hits players and the world
 
nvm: misunderstood

Miu 08-31-2015 15:54

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

Originally Posted by Chdata (Post 2338281)
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

KissLick 08-31-2015 15:56

Re: [TF2] Make a completely custom projectile that hits players and the world
 
I would try to use SDKHook_ShouldCollide and check see what masks I need to take action on.

Chdata 09-01-2015 08:41

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

Originally Posted by Miu (Post 2338682)
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

Chdata 09-01-2015 08:43

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

Originally Posted by TheUnderTaker (Post 2338650)
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.


All times are GMT -4. The time now is 18:24.

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