AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Projectile Camera (https://forums.alliedmods.net/showthread.php?t=328485)

lugui 11-11-2020 21:04

Projectile Camera
 
3 Attachment(s)
I made this plugin after watching this: https://youtu.be/tMU04d_arxI
This is plugin sets your camera to follow your projectiles.

To use it, just toggle it on with the command: sm_pc
Then, the camera will jump to the last projectile you shot while you are holding the reaload key.

Here is a demo: https://youtu.be/4nOER06g9ZI

For extra fun use this

daren adler 11-12-2020 18:14

Re: Projectile Camera
 
Quote:

Originally Posted by lugui (Post 2724619)
I made this plugin after watching this: https://youtu.be/tMU04d_arxI
This is plugin sets your camera to follow your projectiles.

To use it, just toggle it on with the command: sm_pc
Then, the camera will jump to the last projectile you shot while you are holding the reaload key.

Here is a demo: https://youtu.be/4nOER06g9ZI

For extra fun use this

I could only get the Grenades and the orb to work in hl2dm, and when i use the sm_pc the look is having the nads or orb look like it coming at you,,i would like it if it was like the video you showed, how can i do that?(it makes it look like you are the eyes of the player you shot it at).

lugui 11-13-2020 12:21

Re: Projectile Camera
 
Quote:

Originally Posted by daren adler (Post 2724704)
I could only get the Grenades and the orb to work in hl2dm, and when i use the sm_pc the look is having the nads or orb look like it coming at you,,i would like it if it was like the video you showed, how can i do that?(it makes it look like you are the eyes of the player you shot it at).

In order to be able to change the view, the entity must have an m_hOwnerEntity or m_hThrower
after some googling I found there is also "m_hOwner", I'll add it and maybe it will help.
I'll also make some fixes to prevent the camera to be set to an entity is isn't supposed to

Sreaper 11-15-2020 17:20

Re: Projectile Camera
 
Not sure if you saw this but a similar plugin exists and works in TF2 as well. https://forums.alliedmods.net/showthread.php?p=1863414

daren adler 11-15-2020 17:21

Re: Projectile Camera
 
Quote:

Originally Posted by lugui (Post 2724786)
In order to be able to change the view, the entity must have an m_hOwnerEntity or m_hThrower
after some googling I found there is also "m_hOwner", I'll add it and maybe it will help.
I'll also make some fixes to prevent the camera to be set to an entity is isn't supposed to

Ok, good to hear.

daren adler 07-24-2022 14:22

Re: Projectile Camera
 
Quote:

Originally Posted by lugui (Post 2724619)
I made this plugin after watching this: https://youtu.be/tMU04d_arxI
This is plugin sets your camera to follow your projectiles.

To use it, just toggle it on with the command: sm_pc
Then, the camera will jump to the last projectile you shot while you are holding the reaload key.

Here is a demo: https://youtu.be/4nOER06g9ZI

For extra fun use this

I know this is old and been a long time, it works for me but i use merchants and need the (r hold) for them, is there a way to change this to mouse 2 (ATTACK2) insteed of r? i tryed and put PlayerButtons.ATTACK2 and compiled but did not work.

Sreaper 07-24-2022 16:21

Re: Projectile Camera
 
Quote:

Originally Posted by daren adler (Post 2784609)
I know this is old and been a long time, it works for me but i use merchants and need the (r hold) for them, is there a way to change this to mouse 2 (ATTACK2) insteed of r? i tryed and put PlayerButtons.ATTACK2 and compiled but did not work.

PHP Code:

if(buttons IN_RELOAD) {
            
setClientToProjectileiew(client); 

->

PHP Code:

if(buttons IN_ATTACK2) {
            
setClientToProjectileiew(client); 

Lugui was there any particular reason you went with OnGameFrame() instead of OnPlayerRunCmd() to get the client's button inputs?

daren adler 07-24-2022 19:18

Re: Projectile Camera
 
Quote:

Originally Posted by Sreaper (Post 2784614)
PHP Code:

if(buttons IN_RELOAD) {
            
setClientToProjectileiew(client); 

->

PHP Code:

if(buttons IN_ATTACK2) {
            
setClientToProjectileiew(client); 

Lugui was there any particular reason you went with OnGameFrame() instead of OnPlayerRunCmd() to get the client's button inputs?

OK, thank you so much, i will copy and add and compile and see if it works, again ty.

daren adler 07-24-2022 19:30

Re: Projectile Camera
 
Quote:

Originally Posted by Sreaper (Post 2784614)
PHP Code:

if(buttons IN_RELOAD) {
            
setClientToProjectileiew(client); 

->

PHP Code:

if(buttons IN_ATTACK2) {
            
setClientToProjectileiew(client); 

Lugui was there any particular reason you went with OnGameFrame() instead of OnPlayerRunCmd() to get the client's button inputs?

Nope is says this when trying to do that.
Quote:

L 07/24/2022 - 18:24:22: [SM] Failed to load plugin "projectile-camera.smx": Unable to load plugin (unsupported feature set; code is too new).
..it lets it compile but says that, thank you again for trying.

Sreaper 07-24-2022 20:11

Re: Projectile Camera
 
Quote:

Originally Posted by daren adler (Post 2784656)
Nope is says this when trying to do that.

..it lets it compile but says that, thank you again for trying.

Are you running the latest stable Sourcemod? It seems like you are compiling it on a newer version than what your server is running.


All times are GMT -4. The time now is 13:32.

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